missing tapCount method in CCTouch ??

missing tapCount method in CCTouch ??
0.0 0



their is a missing method tapCount in CCTouch … in the forum i have seen it has been accepted as a bug but not resolved in latest version?

any fast workaround i stuck in doubleTap detection, i need to know is double tap is done.

anyone?please help


Same question here. Thanks


But you can implement double tap or any number of tap using count on touches ended and putting maximum allowable delay between them…


I know we can implement this. But Cocos2d-x is ported from Cocos2d-iphone, why it doesn’t implement the same functions of iphone version?


We should not blame on the community of cocos2dx as they have provided and providing amazing cross platform stuffs
And they are much busy guys on doing multiple developments on cross platform side.


Sorry. You misunderstood me. I’m not blaming. I’m just questioning. They are doing great jobs already.


No problem @bagus
If you need help in inmplementing taps then tell me i will help you…


@Viraj Dasondi, thanks for your kindness. I’d like to listen to your opinion. I knew there is a implementation which need to modify EAGLView.mm. But this is only for iOS. What should I do for other platform? Do you have any suggestion for a cross-platform solution? Thanks


The logic is quite simple.
Increment tap count in ccTouchesEnded and and get number of counts.But there are some calculations like delay between taps,resetting taps etc…

In ccTouchesEnded:

first increment count like this

touch_tap=touch_tap+1; //global variable

Then check after one tap :

CCDelayTime *delayAction = cocos2d::CCDelayTime::actionWithDuration(0.2f); // (Maximum allowed delay between taps)
CCCallFunc *callSelectorAction = cocos2d::CCCallFunc::actionWithTarget(this,callfunc_selector(Class::doubleTapReset));
if (touch_tap2 )
// Double tap detected…

And in selector just reset count :

void doubleTapReset(float dt)
touch_tap=0; //Resetting double tap count…