public IEnumerator ShowGameOverScreen(bool hasWon, int moneyEarned)
    {
        skillPanelController.gameObject.SetActive(false);
        yield return(new WaitForSeconds(1f));       // waiting for shit to get settled before showing the damn screen

        gameOverController.ShowGameOver(hasWon, moneyEarned);
    }
    public void GameOver()
    {
        gameOver = true;
        GameOverScreen gameOverScreen = (GameOverScreen)GameObject.Instantiate(gameOverScreenPrefab);

        gameOverScreen.transform.SetParent(GameObject.FindGameObjectWithTag("MainCanvas").transform, false);
        gameOverScreen.ShowGameOver();
    }
Example #3
0
 public void EndGame()
 {
     Time.timeScale = 0;
     Pontuacao.SaveScore();
     GameOverScreen.ShowGameOver();
 }