예제 #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;
}
예제 #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;
}
예제 #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;
}