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


C++ SpriteMainScene::initWithSubTest方法代码示例

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


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

示例1: runSpriteTest

void runSpriteTest()
{
    SpriteMainScene* pScene = new SpritePerformTest1;
    pScene->initWithSubTest(1, 50);
    CCDirector::sharedDirector()->replaceScene(pScene);
    pScene->release();
}
开发者ID:csdnnet,项目名称:hiygame,代码行数:7,代码来源:PerformanceSpriteTest.cpp

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

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

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

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

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


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