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; }
GameOverLayer* GameOverLayer::createWithScore(int score) { GameOverLayer *gover = new GameOverLayer(score); if (gover && gover->init()) { gover->autorelease(); return gover; } CC_SAFE_DELETE(gover); return nullptr; }
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; } }
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; }
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; }