Problem with ccTouchEnded

In my project are two scenes. First is default HelloWorld with some changes, second scene is the same. In fist scene button(like default close button) replace scene to second. And in my second scene i want racieve touches, i added
void ccTouchEnded(CCTouch pTouch, CCEventpEvent);
in .h and
void TestLevel::ccTouchEnded(CCTouch pTouch, CCEventpEvent)
{
if (!isStarted)
{
isStarted = true;
}
}
in .cpp and call
this->setTouchEnabled(true);
in init()
but breakpoint in method ccTouchEnded don’t hit.
I doing all like in tutorial with ninja, using cocos2d-2.0-x-2.0.3 (last version).
Please help me, what i’m doing wrong?
p.s. sorry for my bad english:)

这个地方不可以打中文吗?
少年我觉得你没有错

sorry, but i can understand only english, ukrainian or russian :frowning:

Hi Oleg,

try using ccTouchesEnded instead of ccTouchEnded.
you can check Box2D HelloWorld example, that will help you understand touch delegate.

also check out this link to understand touch delegate in detail, this one is for Cocos2D so syntax is different but concept is same:
http://www.cocos2d-iphone.org/wiki/doku.php/tips:touchdelegates?s[]=targeted&s[]=standard

cheers,
Paresh

Thanks Paresh!
I read your link and it helped me understand how it works.
I changed ccTouchEnded with ccTouchesEnded and it works now:)