Unity Space Shooter – Chapter 12 – Waves of Asteroids(Coroutine!)

We a single control by adding loops

while(!gameOver)

for(i=0;i<#per4 wave; i++)

spawn rock

 

Part 2 – Removing those explosions after a few seconds

  1.  Create a “DestroyByTime” Object
  2. Attach that to the prefab for each of the explosions.