Hi there!
I am making a space invaders game for iphone with xcode. You can move the ship to the right or to the left when pressing the right or the left part of the window.
The "enemies" appear randomly at the top of the window, but the problem is that when a new enemy appears, the ship returns to the initial position, which is bottom center.
An example: say that you want to move the ship to the right, so you press the window and the ship moves towards the x direction, but when a new invader comes in, the ship returns automatically to its initial position.
I'm using a custom UIView class for the ship and I overwrote the drawRect: method. The invaders are UIImageView class images and I add them to the main view.
Any help or suggestion?
Thanks in advance!
EDIT: I realised that when pressing a button that changes the view, the ship also returns... So I imagine that the problem is that when I update the view, the ship goes back...
Please help! Smile | :)