Пример #1
0
 private void TryChangePoint(int sign = 1)
 {
     if (Player.Points == 0 && sign == -1)
     {
         throw new ArgumentOutOfRangeException("CountPointsOutOfRange");
     }
     else
     {
         Player.Points    += 1 * sign;
         player.Point.text = "Points:" + Player.Points.ToString();
         if (speedLevelHandler.CountOfPointForNextLevelSpeed + SpeedLevelHandler.CurrentCountPointOfNextLevelSpeed == Player.Points)
         {
             SpeedLevelHandler.CurrentCountPointOfNextLevelSpeed = Player.Points;
             NewLevelHasBeenTaken?.Invoke();
         }
     }
 }
Пример #2
0
 public void Visit(Debuff Let, GameObject currentObject, Collider2D currentCollider)
 {
     OnLetTaken?.Invoke(Let, currentCollider, currentObject);
     NewLevelHasBeenTaken?.Invoke();
 }