private IEnumerator DieLogicFalling() { fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeIn(playerStats.blackScreenFadeInTime)); yield return(new WaitForSeconds(playerStats.blackScreenFadeInTime)); SceneManager.LoadSceneAsync("SceneStart", LoadSceneMode.Additive); }
private IEnumerator EndCoroutine() { yield return(new WaitForSeconds(3f)); StartCoroutine(FadeOut(currentAlpha)); yield return(new WaitForSeconds(4f)); fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeIn(playerStats.blackScreenFadeInTime)); StartCoroutine(GoToMenuScene()); }
private void Scare() { ScreenShake.instance.ShakeFixed(0.2f, 0.1f); fadeBlackScreenScr.StartCoroutine(fadeBlackScreenScr.FadeIn(0.1f)); ps_scare1.Play(); ps_scare2.Play(); triggerObj.SetActive(true); //Wwise stukje AkSoundEngine.PostEvent("Social_Scream", gameObject); StartCoroutine(TriggerCooldown()); }