I'm looking for a way to simplify some of my code so it doesn't take up 18,000 lines. Basically the code is the same code inside 12 switches.
Code:
Switch (1stage){
case 0:
1.animationimages = empty; // this is an array of image filenames, works fine
break;
case 1:
if (1stuff >= 3){
if (1otherstuff >= 3{
1stage++;
1stuff = 0;
1otherstuff = 0;
1.animationimages = newstageimage; // this is an array of image filenames, works fine
}
}
And so on for 112 stages
What I'm having trouble finding how to do is creating an array of each of the 12 items and a forLoop that makes the changes for each of the items in the array. Thus reducing my 18,000 lines of code to only 1700ish.
Any suggestions?