本文整理汇总了C++中CCDirector::end方法的典型用法代码示例。如果您正苦于以下问题:C++ CCDirector::end方法的具体用法?C++ CCDirector::end怎么用?C++ CCDirector::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCDirector
的用法示例。
在下文中一共展示了CCDirector::end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Run
int CCApplication::Run()
{
IW_CALLSTACK("CCApplication::Run");
s3eBool quitRequested = 0;
bool bNeedQuit = false;
if (!applicationDidFinishLaunching() )
{
return 0;
}
uint64 updateTime = 0 ;
while (true)
{
updateTime = s3eTimerGetMs();
s3eDeviceYield(0);
s3eKeyboardUpdate();
s3ePointerUpdate();
ccAccelerationUpdate();
quitRequested = s3eDeviceCheckQuitRequest();
if( quitRequested) {
CCDirector* pDirector = CCDirector::sharedDirector();
// if opengl view has been released, delete the director.
if (pDirector->getOpenGLView() == NULL)
{
CC_SAFE_DELETE(pDirector);
bNeedQuit = true;
}
else
{
pDirector->end();
}
}
if( bNeedQuit ) {
break;
}
CCDirector::sharedDirector()->mainLoop();
while ((s3eTimerGetMs() - updateTime) < m_nAnimationInterval) {
int32 yield = (int32) (m_nAnimationInterval - (s3eTimerGetMs() - updateTime));
if (yield<0)
break;
s3eDeviceYield(yield);
}
}
return -1;
}
示例2: onOK
void HUILayer::onOK() {
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->end();
}