Quote:
Originally Posted by LeopardDevX
,But if i already have a array of enemies do i need another one?
|
No, I didn't know you already had an array - I thought you needed the code.
Quote:
|
My array of enemies contains uiimageview of a enemy that i added to the array when the game starts and i have a timer to move the enemy, a timer to call spawnenemy method and a timer to keep score...
|
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.
Quote:
|
And i need to spawn enemies randomly in the x axe (i only need one type of enemy that i have added to the array)... how can this be done??
|
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);
Quote:
And how can i increase a timers intervals in a void?? that is being called some time.....
Thanks for all current replies and future...
|
I don't understand this question, can you rephrase it? I don't know what "in a void" means.