I am using cocos2d-1.0.1-x-0.12.0
I’m having trouble in getting right CCSet::count().
It always return 1 in TouchBegan, and only can return up to 2 in TouchMoved.
And didnt invoke touchEnded if there is more than 2 finger.
bool StickerScene::init()
{
...
// Enabling touch event in init
this->setIsTouchEnabled(true);
...
}
void StickerScene::ccTouchesBegan( CCSet *touches, CCEvent *event )
{
CCLog("Began Count = %d",touches->count());
}
void StickerScene::ccTouchesMoved(CCSet* touches, CCEvent* event)
{
CCLog("Moved Count = %d",touches->count());
}
void StickerScene::ccTouchesEnded(CCSet* touches, CCEvent* event)
{
CCLog("Ended Count c = %d",touches->count());
}
Simulation
1 tap
Began Count : 1
move
Moved Count : 1
release
Ended Count : 1
-------------------
1 tap
Began Count : 1
tap again (1 tap, total 2 fingers)
Moved Count : 1
Began Count : 1
Moved Count : 2
tap again (1 tap, total 3 fingers)
Moved Count : 2
release (2 fingers remain)
Moved Count : 2
release (1 fingers remain)
Moved Count : 2
release (no finger remaining)
Ended Count : 1
-------------------------
The TouchBegan Count always 1 even there are some fingers tapped.
The TouchMoved can be 1, and 2. Can’t return right value onward.
The TouchEnded only triggered when there is only 1 finger left released.
Any suggestion? Thank you