示例#1
0
 public void OnUpdate(UpdateEvent e, UnpausedUserNode user, [JoinByUser] ActiveTankNode tank, [JoinByTank] WeaponNode weaponNode)
 {
     if (InputManager.GetActionKeyDown(BattleActions.PAUSE) && (this.IsNearZero(weaponNode.weaponRotationControl.Control) && (this.IsNearZero(tank.chassis.MoveAxis) && this.IsNearZero(tank.chassis.TurnAxis))))
     {
         this.EnterPause(user.Entity);
     }
 }
示例#2
0
 public void OnApplicationFocusLost(ApplicationFocusEvent e, UnpausedUserNode user, [JoinByUser] ActiveTankNode tank)
 {
     if (!e.IsFocused && this.ShouldPauseOnFocusLoss())
     {
         this.EnterPause(user.Entity);
     }
 }