Ejemplo n.º 1
0
GameOverLayer* GameOverLayer::create(const ccColor4B& color)
{
    GameOverLayer *pRet = new GameOverLayer();
    pRet->initWithColor(color);
    pRet->autorelease();
    return pRet;
}
GameOverLayer* GameOverLayer::create(const Color4B& color)
{
    GameOverLayer *pRet = new GameOverLayer();
    if(pRet && pRet->initWithColor(color))
    {
        pRet->autorelease();
        return pRet;
    }
    CC_SAFE_DELETE(pRet);
    return NULL;
}
Ejemplo n.º 3
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;
}
Ejemplo n.º 4
0
GameOverLayer* GameOverLayer::createWithWon( bool won )
{
	GameOverLayer* pRet = new GameOverLayer();
	if (pRet && pRet->initWithWon(won))
	{
		pRet->autorelease();
		return pRet;
	}
	else
	{
		CC_SAFE_DELETE(pRet);
		return NULL;
	}
}
Ejemplo n.º 5
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;
}
Ejemplo n.º 6
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;
}