﻿using System;
using System.Collections.Generic;
using System.Xml;

namespace Oni.Level
{
    partial class LevelImporter
    {
        private static IEnumerable<ScriptCharacter> ReadCharacters(XmlReader xml, string basePath)
        {
            if (xml.SkipEmpty())
                yield break;

            xml.ReadStartElement();

            while (xml.IsStartElement())
                yield return ScriptCharacter.Read(xml);

            xml.ReadEndElement();
        }
    }
}
