当前位置: 首页>>代码示例>>C++>>正文


C++ CCTouchDispatcher::removeDelegate方法代码示例

本文整理汇总了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();
}
开发者ID:rick00young,项目名称:HuanHuan,代码行数:7,代码来源:CardSprite.cpp

示例2: onExit

void TapSprite::onExit()
{
    CCSprite::onExit();
    CCTouchDispatcher* dispatcher =
        CCDirector::sharedDirector()->getTouchDispatcher();
    dispatcher->removeDelegate(this);
}
开发者ID:ytworks,项目名称:private,代码行数:7,代码来源:HelloWorldScene.cpp

示例3:

HelloWorld::~HelloWorld()
{
	//remove it 
	CCTouchDispatcher* pDispatcher = CCDirector::sharedDirector()->getTouchDispatcher();
	pDispatcher->removeDelegate(m_pGUI);
	//release
	m_pGUI->release();
}
开发者ID:tonyhu1983,项目名称:Cobra2d,代码行数:8,代码来源:HelloWorldScene.cpp

示例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);
}
开发者ID:twkevin,项目名称:ddz,代码行数:23,代码来源:CtrlPage.cpp

示例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();
}
开发者ID:qiuxu,项目名称:Cocos2dWindows,代码行数:23,代码来源:CCLayer.cpp

示例6: onExit

void SJLayerColor:: onExit()
{	
	CCTouchDispatcher * pTarget = CCDirector::sharedDirector()->getTouchDispatcher();
	pTarget->removeDelegate(this);
}
开发者ID:quinsmpang,项目名称:LDClient-src-and-scrips,代码行数:5,代码来源:SJLayerColor.cpp

示例7: onExit

void Troop::onExit() {
    CCDirector* director = CCDirector::sharedDirector();
    CCTouchDispatcher* dispatcher = director->getTouchDispatcher();
    dispatcher->removeDelegate(this);
}
开发者ID:Winchy,项目名称:SoulStone,代码行数:5,代码来源:Troop.cpp


注:本文中的CCTouchDispatcher::removeDelegate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。