using Unity.Entities;
using UnityEngine;

namespace Common
{
    public class TDPrefabsAuthoring : MonoBehaviour
    {
        // public GameObject PrefabController;
        public GameObject PrefabCharacter;
        public GameObject PrefabFPSPlayer;
    
        public class TdPrefabsAuthoringBaker : Baker<TDPrefabsAuthoring>
        {
            public override void Bake(TDPrefabsAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.None);
                AddComponent(entity, new TdPrefabs()
                {
                    Character  = GetEntity(authoring.PrefabCharacter, TransformUsageFlags.Dynamic),
                    FPSPlayer  = GetEntity(authoring.PrefabFPSPlayer, TransformUsageFlags.Dynamic)
                });
            }
        }
    }
}


