using System.Collections.Generic;

namespace MonoGame.FourEngine.Tiled
{
    public static class SceneExt
    {
        public static IEnumerable<Entity> AddMap(this Scene scene, Map map, int layer = 0)
        {
            var entites = map.GetEntities(layer);
            foreach (var entity in entites)
            {
                yield return scene.AddEntity(entity);
            }
        }
    }
}