Пример #1
0
 private static void PlayerAttached(PlayerAttachSystemMessage ev)
 {
     if (!ev.Entity.HasComponent <IMoverComponent>())
     {
         ev.Entity.AddComponent <PlayerInputMoverComponent>();
     }
 }
Пример #2
0
 private static void PlayerAttached(object sender, PlayerAttachSystemMessage ev)
 {
     if (ev.Entity.HasComponent <IMoverComponent>())
     {
         ev.Entity.RemoveComponent <IMoverComponent>();
     }
     ev.Entity.AddComponent <PlayerInputMoverComponent>();
 }