private IEnumerator die() { Gamemanager.PlayerDead = true; if (deaths != Gamemanager.DeathCounter) { Gamemanager.DeathCounter++; deaths = Gamemanager.DeathCounter; } GetComponent <Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeAll; Audiomanager.FadeOut(deathScreenFadeTime); StartCoroutine(UIManager.FadeIn(DeathScreen.GetComponent <SpriteRenderer>(), deathScreenFadeTime)); yield return(new WaitForSeconds(deathScreenFadeTime / 60)); CanRestart = true; }
public static void DefeatBoss() { Audiomanager.FadeOut(VictoryScreenFadeTime); }