using Unity.Entities; using UnityEngine; using EE2Clone.Components; namespace EE2Clone.Authoring { public class ProjectileAuthoring : MonoBehaviour { public float Speed = 20f; public class Baker : Baker { public override void Bake(ProjectileAuthoring authoring) { var entity = GetEntity(TransformUsageFlags.Dynamic); AddComponent(entity, new ProjectileTag()); AddComponent(entity, new ProjectileData { Target = Entity.Null, Damage = 0, Speed = authoring.Speed, OwnerPlayerId = 0 }); } } } }