virtual bool ccTouchBegan(CCTouch *pTouch,CCEvent *pEvent);
virtual void ccTouchMoved(CCTouch *pTouch,CCEvent *pEvent);virtual void ccTouchEnded(CCTouch *pTouch,CCEvent *pEvent);
virtual void ccTouchCancelled(CCTouch *pTouch,CCEvent *pEvent);
// default implements are used to call script callback if exist
virtual void ccTouchesBegan(CCSet *pTouches,CCEvent *pEvent);
virtual void ccTouchesMoved(CCSet *pTouches,CCEvent *pEvent);
virtual void ccTouchesEnded(CCSet *pTouches,CCEvent *pEvent);
virtual void ccTouchesCancelled(CCSet *pTouches,CCEvent *pEvent);
cclayer里面的ccTouchBegan和ccTouchesBegan到底调用哪个?
添加下面的代码:CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this,true);就调用的是ccTouchBegan,
原文链接:/cocos2dx/347181.html