CCSprite Touch Event!

I am using Cocos2d and CCSprite to create sprites in my application. I am wondering if there is any easier way to implement the touch event on the CCSprite object. I know the menuitem provides the selector but what does CCSprite provides to handle the touch events.

Answers


I'm really just starting out with Cocos2D, so I may be wrong, but as far as I've understood, CCSprite doesn't actually have any built-in touch handling, and you need to handle it yourself. Usually this is done by keeping a reference of all sprites in an NSMutableArray which you then, on the touch event, iterate through, doing coordinate checks for each sprite.

Let me know if you need some example code.


Need Your Help

Batch insert/update using stored procedure

sql sql-server

Can anyone give me a sample script for batch insert/update of records in table using stored procedure in SQL Server?

Java Wireless module development

java java-me java-wireless-toolkit

I am by no means a Java expert (not really intermediate either) but i can write enough to get me by. At work we are looking a Cinterion TC65 wireless module which runs embedded Java with a 2G sim c...