Send to a Friend
Deleting Sprites from frame (Xcode for iPhone)
So, my first iPhone app is going pretty well, It is a pretty basic game, a space ship at the bottom of the screen that scrolls left or right, and random space junk that falls from the sky. The aim is to dodge it. All i need now is to be able to delete sprites as they either intersect with the player at the bottom of the screen, or as the intersect with an invisible bar at the bottom of the screen.
The bar at the bottom of the screen is how I determine score; has it hit the player or not.
My sprite is called ‘SpaceJunk’
Would it be something like;
if(CGRectIntersectsRect(SpaceJunk.frame,player.frame)) {
SpaceJunk = delete
}
I Know it wont be as simple as that but can you offer advice.
Thanks in advance
Using Fluther
or