Exemple #1
0
GameOverLayer* GameOverLayer::createWithScore(int score)
{
    GameOverLayer *gover = new GameOverLayer(score);
    
    if (gover && gover->init()) {
        gover->autorelease();
        return gover;
    }
    CC_SAFE_DELETE(gover);
    return nullptr;
}
Exemple #2
0
GameOverLayer* GameOverLayer::create(int passScore)
{
	GameOverLayer *pRet = new GameOverLayer();  
	pRet->thisTimeGetscore = passScore;
	if (pRet && pRet->init())
	{   
		pRet->autorelease();   
	}   
	else
	{   
		delete pRet;   
		pRet = NULL;   
	}
	return pRet;
}
Exemple #3
0
GameOverLayer* GameOverLayer::create(int passScore)
{
	GameOverLayer *pRet = new GameOverLayer();
	pRet->_score = passScore;
	log("GameOverLayer%d", passScore);
	if (pRet && pRet->init())
	{
		pRet->autorelease();
	}
	else
	{
		delete pRet;
		pRet = nullptr;
	}
	return pRet;
}