void OnMouseDown() { GameObject controller = GameObject.FindGameObjectWithTag("GameController"); ControleDeFases script = controller.GetComponent("ControleDeFases") as ControleDeFases; gameObject.SetActive(false); script.MudarDeFase(FaseDeJogo.Jogo); }
public void buttonStart() { if (controller == null) { controller = GameObject.FindGameObjectWithTag("GameController"); script = controller.GetComponent("ControleDeFases") as ControleDeFases; } //gameObject.SetActive (false); script.MudarDeFase(FaseDeJogo.Jogo); }