Beispiel #1
0
ResultScene* ResultScene::createWithParam(int level, int minScore, int resultScore)
{
    ResultScene *pRet = new ResultScene();
    if (pRet && pRet->initWithParam(level,minScore,resultScore))
    {
        pRet->autorelease();
        return pRet;
    }
    else
    {
        delete pRet;
        pRet = NULL;
        return NULL;
    }
}
Beispiel #2
0
Scene* ResultScene::createScene(std::vector<int> scores)
{
    auto scene = Scene::create();
    ResultScene *pRet = new ResultScene();
    if (pRet && pRet->initWithScores(scores))
    {
        pRet->autorelease();
    }
    else
    {
        delete pRet;
        pRet = NULL;
        return NULL;
    }
    scene->addChild(pRet);
    return scene;
}