private void Start() { Application.targetFrameRate = 300; currentLives = PlayerPrefsController.GetTotalLives(); explosiveBallEnabled = PlayerPrefsController.GetExplosiveBallEnabled(); gameCanvas = FindObjectOfType <GameCanvas>(); gameCanvas.DisplayScore(currentScore); gameCanvas.DisplayLevel(currentLevel); gameCanvas.DisplayLives(currentLives); }
} //Returns current score public int HandleLivesLost() //Reduces lives by 1 and returns current amount and displays it { currentLives = currentLives - 1; gameCanvas.DisplayLives(currentLives); return(currentLives); }