Exemplo n.º 1
0
    public IEnumerator RunLevel()
    {
        Debug.Log("Starting a new level!");
        WaitForSeconds pause = new WaitForSeconds(1f);

        waveRules.StartLevel(this);
        while (waveRules.IsRunning())
        {
            yield return(pause);
        }
        Debug.Log("All waves ended, level is over!");
        CountCoins();
    }