void Layer::registerWithTouchDispatcher() { TouchDispatcher* pDispatcher = Director::getInstance()->getTouchDispatcher(); if( _touchMode == Touch::DispatchMode::ALL_AT_ONCE ) { pDispatcher->addStandardDelegate(this, 0); } else { pDispatcher->addTargetedDelegate(this, _touchPriority, _swallowsTouches); } }
void Layer::registerWithTouchDispatcher() { TouchDispatcher* pDispatcher = Director::getInstance()->getTouchDispatcher(); if( _touchMode == kTouchesAllAtOnce ) { pDispatcher->addStandardDelegate(this, 0); } else { pDispatcher->addTargetedDelegate(this, _touchPriority, true); } }