selecting stuff...
in
Programming Questions
•
3 years ago
Hi there, making a 'game' where you click on objects and move them around like in a normal RTS game.
coming across a small problem when doing a pause function.
here's what i've got so far
- for(int i < ffighters.size()-1; i<10; i++) {
fFighter ff = (fFighter)ffighters.get(i);
if(ff.moving){
ff.moving = false;
}
else{
ff.moving = true;
}
break;
}
}
i'm not very good on arrays but what i've worked out is that in the first line the 'ffighters.size()-1 is the object that was created most recently; if you put -2 on the end of it it's the second most recent object. how do i get every object in the FOR line?
1