Hi, I am trying to figure how I could move an image with your finger around the screen. Can you make it so you can drag the image and watch for collisions or do you have to set it so the image follows where your finger goes and check for collisions that way? If someone knows any good way of doing this would be helpful.
Also, I have an app currently 'waiting for review',is changing the price and launch date going to place it back into the beginning of the queue. If not what are the only things that will place it back at the beginning of the queue, I know taking out the binary does.
You can then move your UIImageView around and run some collision tests if you want to as well. I know its not the answer but might be the direction??
Ok, that seems to work well for moving the image around the screen, but i want to have another image fall from the screen randomly and have it check for collisions, but it's not working, if you or anyone else knows how i could have the one image animate down the screen while checking for collisions. That would be great
Ok, that seems to work well for moving the image around the screen, but i want to have another image fall from the screen randomly and have it check for collisions, but it's not working, if you or anyone else knows how i could have the one image animate down the screen while checking for collisions. That would be great
check out NSTimer and CGRectIntersectsRect for a simple start to this. The NSTimer will let you fire a method that moves the object from the top of the screen and then you could use the CGRectIntersectsRect within both that method and the touchesMoved method to do some simple collision testing. Not the best in the world but a nice start to get the concept...
check out NSTimer and CGRectIntersectsRect for a simple start to this. The NSTimer will let you fire a method that moves the object from the top of the screen and then you could use the CGRectIntersectsRect within both that method and the touchesMoved method to do some simple collision testing. Not the best in the world but a nice start to get the concept...
Hope this helps!
I know I have that in my code(i'm not a complete noob), I have a timer running about every tenth of a second and each time that runs i want the images to continually move down the screen by about 5 pixels each time. But they're stopping after 5 pixels and they won't move again, only the new images created during that instance move. Here's my code if that helps:
Man, you, me and a lot other people are complete noobs, no need to feel ashamed about it.
So, for the code I think you have to add the UIImageViews in a NSMutableArray , you are overwriting your "bigbomb" everytime the timer runs the "gameLoopone".
THEN you have to loop for all the bombs with a: for (UIImageView* bombs in bombsArray) and update ALL the bombs positions, not just ONE as you do now.
BTW with the code as you have it you are going to create 6 bombs every second.
I doubt that is what you really want, so I would create another NSTimer and another method to create the bombs and let the one you showed us to move them.
Man, you, me and a lot other people are complete noobs, no need to feel ashamed about it.
So, for the code I think you have to add the UIImageViews in a NSMutableArray , you are overwriting your "bigbomb" everytime the timer runs the "gameLoopone".
THEN you have to loop for all the bombs with a: for (UIImageView* bombs in bombsArray) and update ALL the bombs positions, not just ONE as you do now.
Greetings
Ok, i've never worked with arrays, could you show me how to make one for this certain scenario, so that the animation loops through all the images of bigbomb on the screen. Thanks.
Ok, i've never worked with arrays, could you show me how to make one for this certain scenario, so that the animation loops through all the images of bigbomb on the screen. Thanks.
Just like mkeneey says: "Good luck"
I can point you in the right direction but I´m not going to work it for you. You are not a noob so look for it in apple tutorials.
Just like mkeneey says: "Good luck"
I can point you in the right direction but I´m not going to work it for you. You are not a noob so look for it in apple tutorials.