Esempio n. 1
0
    void WaveCompleted()
    {
        Debug.Log("Wave completed");

        state         = SpawnState.COUNTING;
        waveCountdown = timeBetweenWaves;

        if (nextWave + 1 > waves.Length - 1)
        {
            // Stat multiplier
            timeBetweenWaves = timeBetweenWaves * statMultiplier;
            for (int i = 0; i < waves.Length; i++)
            {
                waves [i].rate = (waves [i].rate * statMultiplier) + waves [i].rate;
            }

            prefabManager.IncreaseSpikeRowSpeed(statMultiplier);

            nextWave = 0;
            Debug.Log("ALL WAVES COMPLETE! Looping...");
        }
        else
        {
            nextWave++;
        }
    }