本文整理汇总了C++中CCTouchDispatcher::removeDelegate方法的典型用法代码示例。如果您正苦于以下问题:C++ CCTouchDispatcher::removeDelegate方法的具体用法?C++ CCTouchDispatcher::removeDelegate怎么用?C++ CCTouchDispatcher::removeDelegate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCTouchDispatcher
的用法示例。
在下文中一共展示了CCTouchDispatcher::removeDelegate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: touchDelegateRelease
void CardSprite::touchDelegateRelease()
{
CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
pDispatcher->removeDelegate(this);
this->release();
}
示例2: onExit
void TapSprite::onExit()
{
CCSprite::onExit();
CCTouchDispatcher* dispatcher =
CCDirector::sharedDirector()->getTouchDispatcher();
dispatcher->removeDelegate(this);
}
示例3:
HelloWorld::~HelloWorld()
{
//remove it
CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
pDispatcher->removeDelegate(m_pGUI);
//release
m_pGUI->release();
}
示例4: onEnter
void CCtrlPage::onEnter( void )
{
CCLayer::onEnter();
CCDirector* pDirector = CCDirector::sharedDirector();
if (NULL == pDirector)
{
return;
}
// 强行修改ScrollView的touch Priority=CtrlPage,后加入的CtrlPage会先响应才能吃掉TouchEnd
CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
if (m_pScrollView && pDispatcher)
{
// 系统bug,setPriority不会寻找等待加入的Touch Handle
// pDispatcher->setPriority(getTouchPriority(), m_pScrollView);
pDispatcher->removeDelegate(m_pScrollView);
pDispatcher->addTargetedDelegate(m_pScrollView, getTouchPriority(), false);
}
pDispatcher->removeDelegate(this);
pDispatcher->addTargetedDelegate(this, getTouchPriority(), false);
}
示例5: onExit
void CCLayer::onExit()
{
CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
if( m_bTouchEnabled )
{
pDispatcher->removeDelegate(this);
unregisterScriptTouchHandler();
}
// remove this layer from the delegates who concern Accelerometer Sensor
if (m_bIsAccelerometerEnabled)
{
CCAccelerometer::sharedAccelerometer()->setDelegate(NULL);
}
// remove this layer from the delegates who concern the kaypad msg
if (m_bIsKeypadEnabled)
{
CCKeypadDispatcher::sharedDispatcher()->removeDelegate(this);
}
CCNode::onExit();
}
示例6: onExit
void SJLayerColor:: onExit()
{
CCTouchDispatcher * pTarget = CCDirector::sharedDirector()->getTouchDispatcher();
pTarget->removeDelegate(this);
}
示例7: onExit
void Troop::onExit() {
CCDirector* director = CCDirector::sharedDirector();
CCTouchDispatcher* dispatcher = director->getTouchDispatcher();
dispatcher->removeDelegate(this);
}