****READ BOTTOM 1ST PLS****
basically, I have this code for waves of enemies which I at first all made the same and really focused on getting the game done before figuring out how many enemies should appear at what place. But now that I've finished my game, I cant add anymore rows of enemies spawning, probably sounds weird but it wont compile.
Let me show you.
we take my "phase2" as an example.
now this phase basically is identical to the phase1, but thus its phase2 it ofc needs more enemies.
I can change the spawn location of the current enemies, but I cant add another row of spawning another enemie, I'm limited to 13 rows somehow,
how come?
now by the time I was writing this I realized, it works again. But nothing to be easy about, I used to stop coding overall bec of that little problem.
I just couldnt get an answer for that and wouldnt understand what I've done wrong. I tried everything I thought could work and tried it all over again plenty of times. It magically works again, but I'd still like to know why that is. why was I limited to exactly those 13 rows? actually its 15 ( + the space row and the "phase = 102". Even tho it works, I'm not happy yet. If those kind of problems lead me to just stop what I used to work on for weeks, I'm not sure if I shall continue.
if(phase == 2)
{
phase = 102;
getWorld().addObject(new Enemy1(), 120, 32);
getWorld().addObject(new Enemy1(), 220, 64);
getWorld().addObject(new Enemy1(), 320, 82);
getWorld().addObject(new Enemy1(), 420, 64);
getWorld().addObject(new Enemy1(), 520, 32);
getWorld().addObject(new Enemy2(), 220, 32);
getWorld().addObject(new Enemy2(), 420, 32);
getWorld().addObject(new Asteroid(), 70, 32);
getWorld().addObject(new Asteroid(), 170, 64);
getWorld().addObject(new Asteroid(), 270, 96);
getWorld().addObject(new Asteroid(), 370, 96);
getWorld().addObject(new Asteroid(), 470, 64);
getWorld().addObject(new Asteroid(), 570, 32);
}
