Ejemplo n.º 1
0
 void LoseTheGame()
 {
     isDead = true;
     LifeManager.GetComponent <MasterTowerScript>().enabled = false;
     score = GetComponent <ScoreCounter>().GetScore();
     GetComponent <ScoreCounter>().enabled = false;
     GetComponent <SoulsCounter>().enabled = false;
     wave = GetComponent <WaveSpawner>().GetWave() - 1;
     DeathCamera.SetActive(true);
     MainCamera.SetActive(false);
     MainCamera.transform.Find("OutlineCamera").gameObject.SetActive(false);
     StartCoroutine(FadeCanvas());
     leaderBoardControllerScript.SetScore(score);
     leaderBoardControllerScript.SetWave(wave);
     //Disabling stuff
     GetComponent <BuildManager>().enabled         = false;
     GetComponent <ExtraFunctionalities>().enabled = false;
     MainCamera.transform.parent.gameObject.GetComponent <CameraControllerScript>().enabled = false;
     GameObject.Find("Bruxo").GetComponent <PlayerController>().enabled = false;
     StartCoroutine(Blur());
     fading.AppearPlayerScoreCanvas();
     GameObject.Find("Waves").GetComponent <Text>().text = wave.ToString();
     GameObject.Find("Score").GetComponent <Text>().text = score.ToString();
 }