private IEnumerator DieLogicFalling() { fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeIn(playerStats.blackScreenFadeInTime)); yield return(new WaitForSeconds(playerStats.blackScreenFadeInTime)); SceneManager.LoadSceneAsync("SceneStart", LoadSceneMode.Additive); }
private IEnumerator FadeBlackScreenOut() { fadeBlackScreenScr.blackScreenGroup.alpha = 1; yield return(new WaitForSeconds(playerStats.blackScreenBlackTime)); fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeOut(playerStats.blackScreenFadeOutTime)); }
private IEnumerator ScareLogic() { canStartCoroutine = false; socialState = SocialState.scare; yield return(new WaitForSeconds(0.1f)); Scare(); yield return(new WaitForSeconds(0.1f)); fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeOut(0.1f)); yield return(new WaitForSeconds(scareAnimationTime - 0.1f - 0.1f)); socialState = SocialState.idle; yield return(new WaitForSeconds(scareCooldown)); canStartCoroutine = true; }
private IEnumerator EndCoroutine() { yield return(new WaitForSeconds(3f)); StartCoroutine(FadeOut(currentAlpha)); yield return(new WaitForSeconds(4f)); fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeIn(playerStats.blackScreenFadeInTime)); StartCoroutine(GoToMenuScene()); }