IEnumerator FadeOutReading() { enableButton = false; AkSoundEngine.PostEvent("Interlude", this.gameObject); CardReadingUI readingUI = readingCanvas.GetComponent <CardReadingUI>(); yield return(StartCoroutine(readingUI.FadeOut())); enableButton = true; SetGameState(GameState.FadingOutCardDone); }
void ClearGameState() { StopAllCoroutines(); foreach (ParticleSystem spark in sparks) { sparks[numCardsAlreadyRead].Stop(); sparks[numCardsAlreadyRead].Clear(); } numCardsAlreadyRead = 0; readingUI.StopAllCoroutines(); StartCoroutine(readingUI.FadeOut()); generativeUI.StopAllCoroutines(); StartCoroutine(generativeUI.FadeOut()); generativeUI.Reset(); }