Hi Everyone ,
How to detect ccTouchBegen and ccTouchEnd of s respective sprite object?
A fast, easy to use, free, and community supported 2D game engine
Hi Everyone ,
How to detect ccTouchBegen and ccTouchEnd of s respective sprite object?
Hello Pravin. A lot of this info is available via searching the forum - or the old forum at google code. Go here for this one:
http://juanmunozar.blogspot.com/2009/02/cocos2d-iphone-dynamically-touch.html
pravin, check out the the link by shivaz. Basically you have to iterate through all the sprites in your layer/scene/whatever and check each one to see if the touch event hits them.
Thanks,
This is what I want , it's good article. :-)
It might be a good idea to change:
if (CGRectContainsPoint([obj rect], location) && [obj GetCanTrack]) {
to:
if ([obj visible] && CGRectContainsPoint([obj rect], location) && [obj GetCanTrack]) {
You must log in to post.