Ejemplo n.º 1
0
 private void Start()
 {
     uiGameplay = FindObjectOfType <UIGameplay>();
     uiGameplay.UpdateScore(currentScore, scoreNeededToWin);
     uiGameplay.UpdateBallsLeft(startingBalls);
     lvlNumber = GameManager.Get().GetCurrentLvl();
     Cup[] cups = FindObjectsOfType <Cup>();
     for (int i = 0; i < cups.Length; i++)
     {
         cups[i].AddToScore = AddToScore;
     }
 }
Ejemplo n.º 2
0
 public bool CheckOnOutOfBalls()
 {
     ballsUsed++;
     uiGameplay.UpdateBallsLeft(startingBalls - ballsUsed);
     if (ballsUsed < startingBalls)
     {
         return(false);
     }
     else
     {
         uiGameplay.OnLevelFinished(false);
         return(true);
     }
 }