void Update() { //Debug.Log(transicaoParaODia.ganchoTransicao); if (!painelDeDialogoComandante.activeInHierarchy) { IconeComandante.SetActive(false); IconePlayer.SetActive(false); hudVida.SetActive(true); hudArmas.SetActive(true); hudDash.SetActive(true); } if (textoComandante.activeInHierarchy) { IconeComandante.SetActive(true); IconePlayer.SetActive(false); hudVida.SetActive(false); hudArmas.SetActive(false); hudDash.SetActive(false); } else if (!textoComandante.activeInHierarchy && painelDeDialogoComandante.activeInHierarchy) { IconeComandante.SetActive(false); IconePlayer.SetActive(true); hudVida.SetActive(false); hudArmas.SetActive(false); hudDash.SetActive(false); } if (Input.GetMouseButtonDown(0) && falaAtivaComandante) { if (falasComandante.respostasComandante.Length > 0) { MostrarRespostas(); } else { falaAtivaComandante = false; painelDeDialogoComandante.SetActive(false); falaComandante.gameObject.SetActive(false); movScript.enabled = true; combosScript.enabled = true; jumpScript.enabled = true; dashScript.enabled = true; pauseScript.enabled = true; Cursor.lockState = CursorLockMode.Locked; if (transicaoParaODia.ganchoTransicao >= 2) { StartCoroutine(transicaoCorrotina()); } } } }
void Update() { if (!painelDeDialogoVelho.activeInHierarchy) { IconeVelho.SetActive(false); IconePlayer.SetActive(false); hudVida.SetActive(true); hudArmas.SetActive(true); hudDash.SetActive(true); } if (textoNPC.activeInHierarchy) { IconeVelho.SetActive(true); IconePlayer.SetActive(false); hudVida.SetActive(false); hudArmas.SetActive(false); hudDash.SetActive(false); } else if (!textoNPC.activeInHierarchy && painelDeDialogoVelho.activeInHierarchy) { IconeVelho.SetActive(false); IconePlayer.SetActive(true); hudVida.SetActive(false); hudArmas.SetActive(false); hudDash.SetActive(false); } if (Input.GetMouseButtonDown(0) && falaAtiva) { if (falona.respostinha.Length > 0) { MostrarRespostas(); } else { falaAtiva = false; painelDeDialogoVelho.SetActive(false); falaVelhoNPC.gameObject.SetActive(false); movScript.enabled = true; combosScript.enabled = true; jumpScript.enabled = true; dashScript.enabled = true; pauseScript.enabled = true; Cursor.lockState = CursorLockMode.Locked; } } }