hi,guys!
i was using cocos2dx to build my game,but i found it’s hard to catch muti-Touches in CCTargetedTouchDelegate while i want to swallow touches over other Layers,
i get the implement of CCEvent and it was
class CC_DLL CCEvent : public CCObject
{
};
so i can’t get the infomation about touchEvent
so i also can’t get the number of touches.
what’s more i also find CCTouchDelegate in 2dx,
class CC_DLL CCTouchDelegate
{
public:
CCTouchDelegate() {}
virtual ~CCTouchDelegate()
{
}
virtual bool ccTouchBegan(CCTouch pTouch, CCEventpEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); return false;};
// optional
virtual void ccTouchMoved(CCTouch pTouch, CCEventpEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchEnded(CCTouch pTouch, CCEventpEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchCancelled(CCTouch pTouch, CCEventpEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);}
// optional
virtual void ccTouchesBegan(CCSet pTouches, CCEventpEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchesMoved(CCSet pTouches, CCEventpEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchesEnded(CCSet pTouches, CCEventpEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchesCancelled(CCSet pTouches, CCEventpEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
};
but it also dosn’t work well,
it’s any sugestions ?