Ejemplo n.º 1
0
GameOverScene* GameOverScene::create(int passScore){
	GameOverScene* pRet = new GameOverScene();
	pRet->score = passScore;
	if(pRet && pRet->init()){
		pRet->autorelease();
		return pRet;
	}else{
		pRet->release();
		pRet = NULL;
		return NULL;
	}
}
Ejemplo n.º 2
0
GameOverScene* GameOverScene::create()
{
	GameOverScene *pRet = new GameOverScene();
    if (pRet && pRet->init())
    {
        pRet->autorelease();
        return pRet;
    }
    else
    {
        CC_SAFE_DELETE(pRet);
        return NULL;
    }
}
Ejemplo n.º 3
0
GameOverScene* GameOverScene::create(int passScore)
{
	GameOverScene *pRet = new GameOverScene();
	pRet->score = passScore;
	if (pRet && pRet->init())
	{ 
		pRet->autorelease();
	} 
	else 
	{ 
		delete pRet; 
		pRet = nullptr;
	}
	return pRet;
}
GameOverScene* GameOverScene::create(CarSetup &setup, unsigned int points, EndType type, int seconds, int maxSeconds)
{
	GameOverScene *pRet = new(std::nothrow) GameOverScene(setup, points, type, seconds, maxSeconds);
	if (pRet && pRet->init())
	{
		pRet->autorelease();
		return pRet;
	}
	else
	{
		delete pRet;
		pRet = NULL;
		return NULL;
	}
}