예제 #1
0
파일: CCLayer.cpp 프로젝트: KIngpon/HXGame
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);
    }
}
예제 #2
0
void Layer::registerWithTouchDispatcher()
{
    TouchDispatcher* pDispatcher = Director::getInstance()->getTouchDispatcher();

    if( _touchMode == kTouchesAllAtOnce ) {
        pDispatcher->addStandardDelegate(this, 0);
    } else {
        pDispatcher->addTargetedDelegate(this, _touchPriority, true);
    }
}