Exemplo n.º 1
0
 void Start()
 {
     GameStatic.Revive();
     if (!GameStatic.IsNext())
     {
         GameStatic.ZeroAllScore();
     }
     GameStatic.ZeroScore();
     GameStatic.SetMaxScore(maxScore);
     GameStatic.SaveUnlockedLevels(world, lvl);
 }
Exemplo n.º 2
0
 void OnDestroy()
 {
     if (scoring)
     {
         GameStatic.AddScore();
     }
     if (GameStatic.CheckScore())
     {
         GameStatic.ZeroScore();
         if (!GameObject.FindGameObjectWithTag("GameOver").GetComponent <GameOver>().change&& SceneManager.GetActiveScene().buildIndex + 1 >= GameStatic.levels)
         {
             SceneManager.LoadScene(1);
         }
         else if (!GameObject.FindGameObjectWithTag("GameOver").GetComponent <GameOver>().change&& SceneManager.GetActiveScene().buildIndex + 1 < GameStatic.levels)
         {
             GameStatic.SetNext(true);
             SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
         }
         else
         {
             GameObject.FindGameObjectWithTag("GameOver").GetComponent <GameOver>().change = true;
         }
     }
 }