Пример #1
0
    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;
    }
Пример #2
0
 public static void DefeatBoss()
 {
     Audiomanager.FadeOut(VictoryScreenFadeTime);
 }