예제 #1
0
 public void PointThrow()
 {
     currentPoints++;
     OnPointThrow?.Invoke(currentPoints);
     if (currentPoints >= LevelData.instance.pointsNeeded)
     {
         OnLevelWin?.Invoke();
     }
     print("Point Throw");
 }
예제 #2
0
    private void AddScore(int score)
    {
        this.score += score;
        OnScoreChange?.Invoke(this.score);

        if (FindObjectsOfType <Brick>().Length == 1)
        {
            OnLevelPause?.Invoke(false);
            OnLevelWin?.Invoke(level);
        }
    }