public void TakeDamage(float damage) { if (!isBlocking) { sound.PlayDamage(); AnimateHurt(); } else { sound.PlayBlockedDamage(); dummiesBlocked++; switch (dummiesBlocked) { case (1): tutorialController.SetComplete(1); break; case (2): tutorialController.SetComplete(2); break; case (3): tutorialController.SetComplete(3); tutorialController.EndTutorial(); break; } } lastBlockTime = Time.time; }
private IEnumerator NextSlide() { canSwitchSlides = false; if (currentText != null) { currentText.GetComponent <Animator>().SetTrigger("FadeOut"); } yield return(new WaitForSeconds(1.1f)); slideIndex++; if (slideIndex > noSlides) { tutorialController.EndTutorial(); } else { StartCoroutine(ShowSlide(slideIndex)); } }