Quote:
Originally Posted by smasher
No, I didn't know you already had an array - I thought you needed the code.
You probably only need one timer, calling method like "gameUpdate" - that method could call the other methods that move, spawn, and score. Otherwise you may find your operations happening in the wrong order.
If you have the code to spawn enemies, you just need to use a random number for the x position. Like this:
Code:
int randomX = arc4random() % 320; // number from 0 to 319
newEnemy.center = CGPointMake( randomX, 150);
I don't understand this question, can you rephrase it? I don't know what "in a void" means.
|
I`m really sorry for dum questions...
,but by "in a void" i mean in a method...
And i dont have the code to spawn a enemy..
Thanks for the arc for random code i will use that.. when i know how to spawn enemies.....
And what is the newEnemy is that reffered to "spawnedEnemy" or what is it for?
Thanks...
Sorry im a newb....
And you have helped me alot....
