Example #1
0
 public void UpdateEnemyFlagPointer(UpdateEvent e, EnemyFlagPointerNode pointer, [JoinAll] SelfBattleUser user, [JoinByUser] HUDNodes.SelfTankNode selfTank, [JoinByBattle] ICollection <FlagNotHomeNode> flags, [JoinAll] BattleCameraNode battleCamera, [JoinAll] SingleNode <CTFComponent> ctfGameNode)
 {
     if (flags.Count >= 2)
     {
         FlagNotHomeNode oppositeTeamFlag = this.GetOppositeTeamFlag(flags, user);
         if ((oppositeTeamFlag != null) && this.NotFlagCarrier(selfTank, oppositeTeamFlag))
         {
             this.SetFlagPointerPosition(oppositeTeamFlag, pointer.enemyFlagPointer, battleCamera.camera.UnityCamera);
         }
         else
         {
             pointer.enemyFlagPointer.Hide();
         }
     }
 }
Example #2
0
 public void ChangeFlagTextWhenGrounded(NodeAddedEvent e, [Combine] FlagGroundedNode flag, [Context] SelfBattleUser user, [Context] SingleNode <AlliesFlagPointerComponent> alliesPointer, [Context] EnemyFlagPointerNode enemyPointer)
 {
     if (user.teamGroup.Key == flag.teamGroup.Key)
     {
         alliesPointer.component.SetFlagOnTheGroundState();
     }
     else
     {
         enemyPointer.enemyFlagPointer.SetFlagOnTheGroundState();
     }
 }
Example #3
0
 public void HidePointerWhenFlagHome(NodeAddedEvent e, [Combine] FlagHomeNode flag, SelfBattleUser user, [Context] SingleNode <AlliesFlagPointerComponent> alliesPointer, [Context] EnemyFlagPointerNode enemyPointer, [Context] SingleNode <AlliesBasePointerComponent> alliesBasePointer, [Context] EnemyBasePointer enemyBasePointer)
 {
     if (flag.teamGroup.Key == user.teamGroup.Key)
     {
         alliesPointer.component.Hide();
         alliesBasePointer.component.SetFlagAtHomeState();
     }
     else
     {
         enemyPointer.enemyFlagPointer.Hide();
         enemyBasePointer.enemyBasePointer.SetFlagAtHomeState();
     }
 }