Hello,
I am trying to make a timer inside a for loop.
What i want to get out of it, is that every second, it instantiates an enemy, than wait a second, than instantiate, than wait a second, etc. etc.
But i can’t figure out where and how to put the timer inside,
Could you please be so kind to give me an example.
can someone help me, this is my code :
void SpawnEnemy() {
getwave = GameObject.Find ("HUDObject").GetComponent<HUDScript>();
if(getwave.waveNumber == 1){
for (int i = 0; i < waveOne.Length; i ++){
Instantiate(waveOne*, new Vector3(transform.position.x, transform.position.y, transform.position.z), transform.rotation);*
-
} *
-
} *