Beispiel #1
0
//-----------------------------------------------------------------------------
//	Implementation
//-----------------------------------------------------------------------------
CCScene* CGameScene::scene()
{
	CGameScene* pScene = new CGameScene();
	if (pScene && pScene->init())
	{
		pScene->autorelease();
		return pScene;
	}
	else
	{
		delete pScene;
		pScene = NULL;
		return NULL;
	}
}
Beispiel #2
0
CCScene* CGameLogo::scene()
{
    CGameScene * scene = NULL;
    do 
    {
        // 'scene' is an autorelease object
        scene = new CGameScene();
        scene->autorelease();
        CC_BREAK_IF(! scene);

        // 'layer' is an autorelease object
        CGameLogo *layer = CGameLogo::node();
        CC_BREAK_IF(! layer);

        // add layer as a child to scene
        scene->addChild(layer);
    } while (0);

    // return the scene
    return scene;
}