public void Death()
 {
     lives--;
     if (lives > 0)
     {
         ballScript.Init();
     }
     else
     {
         inGame = false;
         ballScript.Init();
         score.text = "Game over\nScore:" + point.ToString("D8");
         rankingBoard.SetActive(true);
     }
 }
Esempio n. 2
0
    public void Death()
    {
        lifes--;
        if (lifes >= 0)
        {
            lifeCountGUI[lifes].SetActive(false);
            ballCode.Init(true);
        }
        else
        {
            Gameover();
        }

        if (LevelOver)
        {
            LoadLvl();
        }
    }
Esempio n. 3
0
    public void Death()
    {
        lives--;
        if (lives > 0)
        {
            ballScript.Init();
        }
        else
        {
            ballScript.Init();
            score.text = "Game over\nScore:" + point.ToString("D8");
//            ball.gameObject.SetActive(false);
            if (point > bestScore)
            {
                PlayerPrefs.SetInt("Score", point);
                PlayerPrefs.Save();
            }

            btnRetry.SetActive(true);
            btnExit.SetActive(true);
        }
    }