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(); } } }
public void Visit(Debuff Let, GameObject currentObject, Collider2D currentCollider) { OnLetTaken?.Invoke(Let, currentCollider, currentObject); NewLevelHasBeenTaken?.Invoke(); }