public void AnswerCold() { if (lookAtMe) { if (alerting) { canvasPivot.SetActive(false); entertainorAudioSource.PlayOneShot(alrightSound, 0.8f); alerting = false; alertTimer = Random.Range(alertMinTimer, alertMaxTimer); if (question != Question.Oxygen && lifeManager.coldLevel >= 10) { coldMistakes += 1; } else if (question == Question.Oxygen) { coldMistakes += 1; } else { coldGood += 1; } } else { if (lifeManager.coldLevel >= 10) { coldMistakes += 1; } else { coldGood += 1; } } StartCoroutine(ender.endCoroutine()); } }
private void OnTriggerExit(Collider collider) { if (collider.gameObject.CompareTag("settingsButton")) { settings.gameObject.SetActive(true); menu.gameObject.SetActive(false); menuSound.Play(); } if (collider.gameObject.CompareTag("helpButton")) { help.gameObject.SetActive(true); menuSound.Play(); menu.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("QuitButton")) { popFin.gameObject.SetActive(true); menu.gameObject.SetActive(false); menuSound.Play(); } if (collider.gameObject.CompareTag("Quitter")) { menuSound.Play(); Application.Quit(); } if (collider.gameObject.CompareTag("Rester")) { popFin.gameObject.SetActive(false); menu.gameObject.SetActive(true); menuSound.Play(); } if (collider.gameObject.CompareTag("volumeMoinsGeneral")) { menuSound.Play(); thisGeneralVolume.value -= 10f; generalVolume.value -= 10f; } if (collider.gameObject.CompareTag("volumePlusGeneral")) { menuSound.Play(); thisGeneralVolume.value += 10f; generalVolume.value += 10f; } if (collider.gameObject.CompareTag("volumeMoinsFX")) { menuSound.Play(); thisFXVolume.value -= 10f; FXVolume.value -= 10f; } if (collider.gameObject.CompareTag("volumePlusFX")) { menuSound.Play(); thisFXVolume.value += 10f; FXVolume.value += 10f; } if (collider.gameObject.CompareTag("OKPop")) { menuSound.Play(); popDebut.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("AlertUnderstood")) { menuSound.Play(); popAlerte.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("OkMainScene")) { menuSound.Play(); popDebutMain.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("PassTuto")) { menuSound.Play(); StartCoroutine(PassTutoCouroutine()); TutoFinish.tutoFinish = true; } if (collider.gameObject.CompareTag("PassTuto1")) { StartCoroutine(PassTuto1()); } if (collider.gameObject.CompareTag("EndSuivant")) { menuSound.Play(); menuEnd1.gameObject.SetActive(false); menuEnd2.gameObject.SetActive(true); } if (collider.gameObject.CompareTag("Restart")) { menuSound.Play(); TutoFinish.tutoFinish = false; SceneManager.LoadScene("Dive"); } if (collider.gameObject.CompareTag("ForgotAnswer")) { menuSound.Play(); popForgotAnswer.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("CancelRemonter")) { menuSound.Play(); popRemonter.gameObject.SetActive(false); } if (collider.gameObject.CompareTag("EndDive")) { menuSound.Play(); popRemonter.gameObject.SetActive(false); StartCoroutine(ender.endCoroutine()); } }