コード例 #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>();
 }