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::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; }