I've to decide how to code enemy spawn: quantity and time. What's a good approach to do that ?
Maybe a class like this ?
class Level {
int levelNr ;
int soldierQty; // number of enemy soldier
int aircraftQty; // number of aircraft
float maxTimeToComplete;
...
...
}
Then, in main code
Level[100] levels;
levels[0].levelNr = 1;
levels[0].soldierQty = 5;
levels[0].aircraftQty = 3;
levels[0].maxTimeToComplete = 10; // 10 seconds
levels[1].levelNr = 2;
etc etc etc
Is it a good approach ? Is there a different way I haven't thought ?
Thanks