public void DestroyMe() { if (Instaciado) { GameObject.Find("MenuPause").GetComponent <scrPauseMenu>().enabled = true; Follower.GetComponent <scrFollowCam>().PTFollow = Player; GameObject.Find("PassosPlayer").GetComponent <AudioSource>().mute = false; Player.GetComponent <scrInterfaceItens>().enabled = true; Player.GetComponent <scrPlayer>().Andando = true; Player.GetComponent <scrPlayer>().enabled = true; Player.GetComponent <scrPlayerAim>().enabled = true; if (Item1) { Iten1.SetActive(true); } if (Item2) { Iten2.SetActive(true); } } if (LastLevel) { GameObject.Find("ServerManager(Clone)").GetComponentInChildren <scrSliderCount>().enabled = true; } Destroy(gameObject); }
void InstacieOBalão() { b = Instantiate(BallonChat, new Vector3(0, 80, 0), Quaternion.identity) as GameObject; b.transform.SetParent(Canvas.transform, false); if (Item1) { Iten1.SetActive(false); b.GetComponent <scrDeletBalon>().Item1 = true; b.GetComponent <scrDeletBalon>().Iten1 = Iten1; } if (Item2) { Iten2.SetActive(false); b.GetComponent <scrDeletBalon>().Item2 = true; b.GetComponent <scrDeletBalon>().Iten2 = Iten2; } b.GetComponentInChildren <scrChat>().Texto = Chat; b.transform.rotation = Quaternion.Euler(0.0f, 0.0f, 0.0f); InvokeRepeating("AskFollow", 0.02f, 0.03f); }