void Update() { if (time <= 0) { if (flashTimer <= 0) { redFlash.SetBool("flashing", false); flash.SetBool("Transform", false); fear.fear += fearBoost; disabler.index = goToPanelFail; disabler.Next(); } else { redFlash.SetBool("flashing", true); flashTimer -= Time.deltaTime; } } else { redFlash.SetBool("flashing", false); flash.SetBool("Transform", true); time -= Time.deltaTime; } }
IEnumerator PlayEndAnims() { bubble.SetTrigger("Leave"); for (int i = 0; i < buttons.Length; i++) { buttons[i].SetTrigger("Leave"); } yield return(new WaitForSeconds(0.2f)); disabler.index = goToPanel; disabler.Next(); if (causeFear == true) { fear.fear += boost; } else { fear.fear -= boost; } }