Beispiel #1
0
    private IEnumerator ActuallyKill()
    {
        if (!dead)
        {
            dead = true;
            DeathManager d = FindObjectOfType <DeathManager>();
            if (d)
            {
                d.FadeIn(2);
            }
            yield return(new WaitForSeconds(4));

            SceneLoader loader = FindObjectOfType <SceneLoader>();
            if (loader)
            {
                loader.Load("menu");
            }
        }
        yield break;
    }