Hi, does anyone know any good places where I can find tutorials for COCOs2d in regard to touches, or can someone just explain them to me in general. I have a book that explain gestures, taps, etc, but it doesn't explain in regard to different events occurring. For example, in my main menu, I have the background layer which holds all the static images. In the 1st layer I have images rotating, and in the second layer I have the touches occurring. I want to do it so it knows which image(sprite) i am tapping. For example, if I am tapping image1, turn it green, but if I am tapping image 2, turn in blue. I know I need to set up an if statement, but what goes inside of the if statement? Right now, I only know of
UITouch *touch = [touches anyObject];
if( touch )
but I don't want it for touches anyObject, I want it to know which object it taps. So here is my non, code logic! Obviously it doesnt work,
if(touch image1)
...
if(touch begin)
runScene(gamescene)
if(touch end)
quit application
So, if someone could explain how to figure out when I am touching an image object, that would help! Thanks!