I am working on a tower defence game in XNA, and I have a class called Tank which creates an enemy that follows a route around a map that is found via A*. Right now, I can create multiple instances of Tank, but they all spawn at the same time. This means that they are in exactly the same place as they follow the route, making it appear like there is only one enemy.
Here is my code for loading a new wave:
if (spawn == true)
{
maxTanks += 2;
killsInWave += 2;
tanks = new Tank[maxTanks];
for (int i = 0; i < maxTanks; i++)
{
tanks[i] = new Tank();
tanks[i].Initialize(map);
tanks[i].LoadContent(Content);
}
waveNum += 1;
spawn = false;
}
Could anyone give me a little help making each enemy spawn with a delay between it and the last one?