private static void PlayerAttached(PlayerAttachSystemMessage ev) { if (!ev.Entity.HasComponent <IMoverComponent>()) { ev.Entity.AddComponent <PlayerInputMoverComponent>(); } }
private static void PlayerAttached(object sender, PlayerAttachSystemMessage ev) { if (ev.Entity.HasComponent <IMoverComponent>()) { ev.Entity.RemoveComponent <IMoverComponent>(); } ev.Entity.AddComponent <PlayerInputMoverComponent>(); }