Hi guys,
I’m a total noob with Unity and I have struck an issue with my game… I’m not quite sure how to spawn enemies.
I was thinking I’d wrap a WaitForSeconds inside a good old for loop, but a “yield” doesn’t seem to work within a function update…
I’ve looked all through the scripting reference but can’t seem to work out how to get it going.
Basically, I want something like this:
for (int i =0; i < 10; ++i) // Counts up the number of enemies to spawn.
{
// Spawn Enemy
// Wait a certain amount of time
}
I know how to spawn objects… just stumped on the waiting bit…
Any help greatly appreciated
Cheers!