At the start of the layout, 20 objects of Enemy are created (one by one with a for loop). I wish there was a way to create the object with a constructor and individually set the variables. I want 10 of the Enemies instance variables "type" to be 0, 5 to be 1, and 5 to be 2.
in java you could simply do this:
enemy;
for(int a=0;a<=19;a++){
enemy = new Enemy();
if(a<10){
enemy.type=0;
}else if(a<15){
enemy.type=1;
}else{
enemy.type=2;
}
}
However, I cannot for the life of me figure out how to do this without setting "type" to 0 1 or 2 for ALL Enemies.