UNITY TUTORIAL | PROJECT | SPACE SHOOTER |12. Spwan Waves

2
instantiating “hazard” inside “for loop” 

 

3
setting public variable “hazard count”

 

ezgif.com-video-to-gif
multiple “hazard”s are instantiated at the same time

 

 

4
using “WaitForSeconds()” to put a pause between every instantiation
5
creating “coroutine” to use “WaitForSeconds()”
6
setting “Game Controller” using “coroutine”

 

ezgif.com-video-to-gif-2
spawning “a” wave

 

7
adding “while loop” to make in

 

ezgif.com-video-to-gif-3.gif
having multiple waves of hazard

 

8
clones of “explosion” animation resting in the game
9.png
using “Destroy()” with “lifeTime” variable to remove useless GameObjects
10
setting destroy timer by selecting multiple components

ezgif.com-video-to-gif-4.gif