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


C++ CCDirector::setNotificationNode方法代码示例

本文整理汇总了C++中CCDirector::setNotificationNode方法的典型用法代码示例。如果您正苦于以下问题:C++ CCDirector::setNotificationNode方法的具体用法?C++ CCDirector::setNotificationNode怎么用?C++ CCDirector::setNotificationNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCDirector的用法示例。


在下文中一共展示了CCDirector::setNotificationNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getClassTypeName

	void Cocos2dRenderManager::initialise()
	{
		CCDirector *pDirector = CCDirector::sharedDirector();
		MYGUI_PLATFORM_ASSERT(!mIsInitialise, getClassTypeName() << " initialised twice");
		MYGUI_PLATFORM_LOG(Info, "* Initialise: " << getClassTypeName());

		CCSize s = pDirector->getWinSizeInPixels();

		this->setPosition(0, 0);
		this->setContentSize(s);
		setViewSize(int(s.width), int(s.height));

		// 绑定到cocos2d节点
		pDirector->setNotificationNode(this);

		mInfo.pixWidth = s.width;
		mInfo.pixHeight = s.height;

		mVertexFormat = VertexColourType::ColourABGR;

		mUpdate = true;

		kmMat4 tmp;
		kmGLGetMatrix(KM_GL_PROJECTION, &tmp);
		kmMat4Inverse(&mMatrix, &tmp);

		MYGUI_PLATFORM_LOG(Info, getClassTypeName() << " successfully initialized");
		mIsInitialise = true;

		CCNotificationCenter::sharedNotificationCenter()->addObserver(this,
			callfuncO_selector(Cocos2dRenderManager::listenForeToBackground),
			EVENT_COME_TO_BACKGROUND,
			NULL);
		pDirector->getScheduler()->scheduleUpdateForTarget(this, kCCPriorityNonSystemMin, false);
	}
开发者ID:dayongxie,项目名称:MyGUI,代码行数:35,代码来源:MyGUI_Cocos2dRenderManager.cpp

示例2: finishAndCleanup

//------------------------------------------------------------------------------
bool finishAndCleanup(CCScene * pInScene, CCScene * pOutScene)
{
    // clean up     
    pInScene->setVisible(true);
    pInScene->setPosition(ccp(0, 0));
    pInScene->setScale(1.0f);
    pInScene->setRotation(0.0f);
    pInScene->getCamera()->restore();

    pOutScene->setVisible(false);
    pOutScene->setPosition(ccp(0, 0));
    pOutScene->setScale(1.0f);
    pOutScene->setRotation(0.0f);
    pOutScene->getCamera()->restore();


    // Before replacing, save the "send cleanup to scene"
    CCDirector *director = CCDirector::sharedDirector();
    director->setNotificationNode(pInScene);
    return director->isSendCleanupToScene();
}
开发者ID:sbc100,项目名称:OpenQuick,代码行数:22,代码来源:QTransition.cpp


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