Quote:
Originally Posted by LeopardDevX
But.....
I cant get the newEnemy to move after its spawned.....
So how??
Thank you so much it all makes perfect sense to me now...
|
You probably have a moveEnemy method that is called every frame? That method now needs to look through the array of enemies, and move them all. That's what the array is for. This will loop through every enemy in the array, and move each one down and to the right:
Quote:
for (UIView *anEnemy in enemies){
int newX = anEnemy.center.x +5;
int newY = anEnemy.center.y +5;
anEnemy.center = CGPointMake(newX, newY);
}
|