private IEnumerator Intro() { yield return(new WaitForSeconds(1f)); transition.BlockInteraction(true); currentTracingInfo = screenManagement.GetCurrentScreen().GetComponent <TracingInformation>(); Debug.Log("Intro calling: " + currentTracingInfo.gameObject.name); patetaLeft.SetActive(currentTracingInfo.PatetaOnTheLeft); patetaRight.SetActive(!currentTracingInfo.PatetaOnTheLeft); // fillController.UpdateTrailObject(screenManagement.GetCurrentScreen().transform.GetChild(0)); fillController.UpdateTrailObject(currentTracingInfo.transform.GetChild(0)); yield return(StartCoroutine(transition.FadeIn())); // play audio cue transition.BlockInteraction(false); yield return(StartCoroutine(PlayAudio(currentTracingInfo.IntroAudioDescription))); }
private IEnumerator TransitionScenes(ArcoTracingCollider from, ArcoTracingCollider to) { // Block Screen transition.BlockInteraction(true); // Play Audio AudioManager.instance.PlaySound("Right Click"); AudioManager.instance.PlayRandomSuccessSound(); yield return(new WaitForSeconds(1f)); // Fade Out yield return(StartCoroutine(transition.FadeOut())); // Change Items from.ResetEverything(); from.transform.parent.gameObject.SetActive(false); to.ResetEverything(); to.transform.parent.gameObject.SetActive(true); currentTracingInfo = to.transform.parent.GetComponent <TracingInformation>(); patetaLeft.SetActive(currentTracingInfo.PatetaOnTheLeft); patetaRight.SetActive(!currentTracingInfo.PatetaOnTheLeft); // Fade In yield return(StartCoroutine(transition.FadeIn())); // retrieve scene transition.BlockInteraction(false); yield return(StartCoroutine(PlayAudio( currentTracingInfo.IntroAudioDescription))); }
private IEnumerator Quit() { Debug.Log("Quitting to main menu!"); screenTransition.BlockInteraction(true); // yield return StartCoroutine(screenTransition.FadeOut()); ResetGame(); AudioManager.instance.StopAllSounds(); yield return(null); }