Ejemplo n.º 1
0
    public void AddScore(int scorePoints, int addTime)
    {
        timeLeft      += addTime;
        score         += scorePoints;
        scoreText.text = score.ToString();

        onScoreChangedEvent.Invoke(score);
    }
Ejemplo n.º 2
0
 private void RaiseScoreChangedEvent(int score)
 {
     ScoreChangedEvent?.Invoke(score);
 }
Ejemplo n.º 3
0
 public void IncreaseScore(int points)
 {
     score += points;
     OnScoreChange.Invoke(score);
 }
Ejemplo n.º 4
0
 void Update()
 {
     distance = player.transform.position.x - startX;
     onScoreChanged.Invoke(distance);
 }
Ejemplo n.º 5
0
 public void AddScore(int value)
 {
     _score += value;
     ScoreChangedEvent?.Invoke(_score);
 }