Ejemplo n.º 1
0
 public void EndGame()
 {
     DestroyEnemyObjects();
     DestroyPlayerObjects();
     isGameStarted = false;
     isGameOver    = true;
     //deactivate spawners
     playerSpawner.SetActive(false);
     enemySpawner.SetActive(false);
     PlayerSpawnerController.pCount = 0;
     EnemySpawner.ResetCount();
     BoostSpawner.ResetCount();
 }
Ejemplo n.º 2
0
 public void BackToMainMenuBtn()
 {
     EndGame();
     minutes       = 0;
     seconds       = 0;
     isGameOver    = false;
     isGameStarted = false;
     gameOverUI.SetActive(false);
     gamePlayUI.SetActive(false);
     mainMenuUI.SetActive(true);
     PlayerSpawnerController.pCount = 0;
     EnemySpawner.ResetCount();
     BoostSpawner.ResetCount();
 }
Ejemplo n.º 3
0
 public void RestartGameBtn()
 {
     Debug.Log("restart");
     DestroyEnemyObjects();
     DestroyPlayerObjects();
     gameOverUI.SetActive(false);
     gamePlayUI.SetActive(true);
     playerSpawner.SetActive(true);
     enemySpawner.SetActive(true);
     isGameOver    = false;
     isGameStarted = true;
     PlayerSpawnerController.pCount = 0;
     EnemySpawner.ResetCount();
     BoostSpawner.ResetCount();
 }