void ParticleMenuLayer::showCurrentTest()
{
    auto scene = (ParticleMainScene*)getParent();
    int subTest = scene->getSubTestNum();
    int parNum  = scene->getParticlesNum();

    ParticleMainScene* pNewScene = NULL;

    switch (_curCase)
    {
    case 0:
        pNewScene = new ParticlePerformTest1;
        break;
    case 1:
        pNewScene = new ParticlePerformTest2;
        break;
    case 2:
        pNewScene = new ParticlePerformTest3;
        break;
    case 3:
        pNewScene = new ParticlePerformTest4;
        break;
    }

    s_nParCurIdx = _curCase;
    if (pNewScene)
    {
        pNewScene->initWithSubTest(subTest, parNum);

        Director::getInstance()->replaceScene(pNewScene);
        pNewScene->release();
    }
}
Ejemplo n.º 2
0
void runParticleTest()
{
    ParticleMainScene* pScene = new ParticlePerformTest1;
    pScene->initWithSubTest(1, kNodesIncrease);

    CCDirector::sharedDirector()->replaceScene(pScene);
    pScene->release();
}
void runParticleTest()
{
    ParticleMainScene* scene = new ParticlePerformTest1;
    scene->initWithSubTest(1, kNodesIncrease);

    Director::getInstance()->replaceScene(scene);
    scene->release();
}