EARTH DEFENDER QUEST: ‘End Of The World As We Know It’ - Solutions

Quest: Earth Defender Quest
Challenge: End Of The World As We Know It

Feel free to share your solutions, ideas and creations below. If you get stuck, you can find some ideas here for completing this challenge.

Spawning waves can be done several ways, this is how I decided to do it

 IEnumerator Generate()
    {
        for (; ; )
        {
            yield return new WaitForSeconds(8f);
            if (FindObjectOfType<GameEngine>().playing)
            {
                if (allAsteroids.Count == 0)
                {
                    audioSource.PlayOneShot(warningSound);
                    wave++;
                    waveText.text = "Wave " + wave.ToString();

                    for (int x = 0; x < wave; x++)
                    {
                        SpawnAsteroid();
                    }
                }

                while (allAsteroids.Count > 0)
                {
                    yield return null;
                }
          }
    }

Privacy & Terms