Exemplo n.º 1
0
 public void FollowNewUser(NodeAddedEvent e, WeaponNode weapon, [JoinByUser] FollowedBattleUserNode followedBattleUser)
 {
     if (!weapon.Entity.HasComponent <CameraTargetComponent>())
     {
         CameraTargetComponent component = new CameraTargetComponent(weapon.weaponInstance.WeaponInstance);
         weapon.Entity.AddComponent(component);
     }
 }
Exemplo n.º 2
0
 public void AddCameraTarget(NodeAddedEvent e, WeaponNode weapon, [Context, JoinByTank] SelfTankReadyForCameraNode tank)
 {
     if (!weapon.Entity.HasComponent <CameraTargetComponent>())
     {
         CameraTargetComponent component = new CameraTargetComponent {
             TargetObject = weapon.weaponInstance.WeaponInstance.gameObject
         };
         weapon.Entity.AddComponent(component);
     }
 }