本文整理汇总了C++中SpriteMainScene::release方法的典型用法代码示例。如果您正苦于以下问题:C++ SpriteMainScene::release方法的具体用法?C++ SpriteMainScene::release怎么用?C++ SpriteMainScene::release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpriteMainScene
的用法示例。
在下文中一共展示了SpriteMainScene::release方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: runSpriteTest
void runSpriteTest()
{
SpriteMainScene* pScene = new SpritePerformTest1;
pScene->initWithSubTest(1, 50);
CCDirector::sharedDirector()->replaceScene(pScene);
pScene->release();
}
示例2: showCurrentTest
void SpriteMenuLayer::showCurrentTest()
{
SpriteMainScene* scene = NULL;
auto pPreScene = (SpriteMainScene*) getParent();
int nSubTest = pPreScene->getSubTestNum();
int nNodes = pPreScene->getNodesNum();
switch (_curCase)
{
case 0:
scene = new SpritePerformTest1;
break;
case 1:
scene = new SpritePerformTest2;
break;
case 2:
scene = new SpritePerformTest3;
break;
case 3:
scene = new SpritePerformTest4;
break;
case 4:
scene = new SpritePerformTest5;
break;
case 5:
scene = new SpritePerformTest6;
break;
case 6:
scene = new SpritePerformTest7;
break;
}
SpriteMainScene::_s_nSpriteCurCase = _curCase;
if (scene)
{
scene->initWithSubTest(nSubTest, nNodes);
Director::getInstance()->replaceScene(scene);
scene->release();
}
}
示例3: showCurrentTest
void SpriteMenuLayer::showCurrentTest()
{
SpriteMainScene* scene = nullptr;
auto pPreScene = (SpriteMainScene*) getParent();
int nSubTest = pPreScene->getSubTestNum();
int nNodes = pPreScene->getNodesNum();
switch (_curCase)
{
case 0:
scene = new (std::nothrow) SpritePerformTestA;
break;
case 1:
scene = new (std::nothrow) SpritePerformTestB;
break;
case 2:
scene = new (std::nothrow) SpritePerformTestC;
break;
case 3:
scene = new (std::nothrow) SpritePerformTestD;
break;
case 4:
scene = new (std::nothrow) SpritePerformTestE;
break;
case 5:
scene = new (std::nothrow) SpritePerformTestF;
break;
case 6:
scene = new (std::nothrow) SpritePerformTestG;
break;
}
SpriteMainScene::_s_nSpriteCurCase = _curCase;
if (scene)
{
scene->initWithSubTest(nSubTest, nNodes);
Director::getInstance()->replaceScene(scene);
scene->release();
}
}
示例4: showCurrentTest
////////////////////////////////////////////////////////
//
// SpriteMenuLayer
//
////////////////////////////////////////////////////////
void SpriteMenuLayer::showCurrentTest()
{
SpriteMainScene* pScene = NULL;
SpriteMainScene* pPreScene = (SpriteMainScene*) getParent();
int nSubTest = pPreScene->getSubTestNum();
int nNodes = pPreScene->getNodesNum();
switch (m_nCurCase)
{
case 0:
pScene = new SpritePerformTest1;
break;
case 1:
pScene = new SpritePerformTest2;
break;
case 2:
pScene = new SpritePerformTest3;
break;
case 3:
pScene = new SpritePerformTest4;
break;
case 4:
pScene = new SpritePerformTest5;
break;
case 5:
pScene = new SpritePerformTest6;
break;
case 6:
pScene = new SpritePerformTest7;
break;
}
s_nSpriteCurCase = m_nCurCase;
if (pScene)
{
pScene->initWithSubTest(nSubTest, nNodes);
CCDirector::sharedDirector()->replaceScene(pScene);
pScene->release();
}
}
示例5: autoShowSpriteTests
void SpriteMainScene::autoShowSpriteTests(int curCase, int subTest, int nodes)
{
SpriteMainScene* scene = nullptr;
switch (curCase)
{
case 0:
scene = new (std::nothrow) SpritePerformTestA;
break;
case 1:
scene = new (std::nothrow) SpritePerformTestB;
break;
case 2:
scene = new (std::nothrow) SpritePerformTestC;
break;
case 3:
scene = new (std::nothrow) SpritePerformTestD;
break;
case 4:
scene = new (std::nothrow) SpritePerformTestE;
break;
case 5:
scene = new (std::nothrow) SpritePerformTestF;
break;
case 6:
scene = new (std::nothrow) SpritePerformTestG;
break;
default:
CCASSERT(false, "Invalid scene value");
break;
}
if (scene)
{
scene->initWithSubTest(subTest, nodes);
Director::getInstance()->replaceScene(scene);
scene->release();
}
}
示例6: autoShowSpriteTests
void SpriteMainScene::autoShowSpriteTests(int curCase, int subTest,int nodes)
{
SpriteMainScene* scene = NULL;
switch (curCase)
{
case 0:
scene = new SpritePerformTest1;
break;
case 1:
scene = new SpritePerformTest2;
break;
case 2:
scene = new SpritePerformTest3;
break;
case 3:
scene = new SpritePerformTest4;
break;
case 4:
scene = new SpritePerformTest5;
break;
case 5:
scene = new SpritePerformTest6;
break;
case 6:
scene = new SpritePerformTest7;
break;
}
SpriteMainScene::_s_nSpriteCurCase = curCase;
if (scene)
{
scene->initWithSubTest(subTest, nodes);
Director::getInstance()->replaceScene(scene);
scene->release();
}
}