views:

549

answers:

1

I created my OwnCCSprite, and it get the implemented CCStandardTouchDelegate protocol, and ccTouchesBegan event. But it seems not working. When I click the CCSprite, the ccTouchesBegan in the CCLayer is called, but the CCSprite's ccTouchesBegan can't called. How can I detect the CCSprite is being touched in CCLayer / OwnCCSprite? or I need to calculate the touch position, and compares it to the OwnCCSprite positions?

Thz.....

A: 

Have a look at the 'TouchesTest' example included with the cocos2d source code. Specifically take a look at the paddle file.

StarShip3000