//Awake, Start and Update #region UnityBasics void Awake() { //Atrela o Script do PlayerBehavior pb = GetComponent <PlayerBehavior>(); //Atrela o UICanvas UICanvas = GameObject.Find("UICanvas"); GameCanvas = GameObject.Find("GameCanvas"); //Atrela o GameManager GM = GameObject.Find("GameManager").GetComponent <GameManager>(); //Procura o Painel de Tentar de novo (PainelTryAgain) if (UICanvas.transform.Find("PainelTryAgain") != null) { textPro = UICanvas.transform.Find("PainelTryAgain").Find("Timer").GetComponent <TextMeshProUGUI>(); } if (GameObject.Find("Ads") != null) { ads = GameObject.Find("Ads").GetComponent <DeathAds>(); } if (GameObject.Find("GameTimer") != null) { gameTimer = GameObject.Find("GameTimer").GetComponent <GameTimer>(); } }
void Start() { lb = GameObject.Find("Player").GetComponent <LifeBehavior>(); player = GameObject.Find("Player").GetComponent <Player>(); GM = GameObject.Find("GameManager").GetComponent <GameManager>(); ads = GameObject.Find("Ads").GetComponent <DeathAds>(); gameTimer = GameObject.Find("GameTimer").GetComponent <GameTimer>(); GM.Mute(); CheckMuteIcon(); }