using Encompass;
using KavTest.Components;
using KavTest.Messages;
using Microsoft.Xna.Framework;

namespace KavTest.Spawners
{
    public class MeshSpriteSpawner : Spawner<MeshSpriteSpawnMessage>
    {
        protected override void Spawn(in MeshSpriteSpawnMessage message)
        {
            var entity = CreateEntity();

            AddComponent(entity, new Transform3DComponent(message.Transform));
            AddComponent(entity, new MeshSpriteComponent(message.MeshSprite));
        }
    }
}
