Пример #1
0
    public void NextLevel()
    {
        // Generate level
        game.NextLevel();
        levelText.IncrementLevelText();

        // Fade IN and OUT
        StartCoroutine(fader.FadeFor(0.2f, 5, Fader.initialSpeed));

        FindObjectOfType <AudioManager>().GetComponent <AudioManager>().Play("NextLevel");

        // Spawn players in our spawn point (At the beggining of the level)
        StartCoroutine(Spawn());

        RegeneratePlayers();
    }