void BombCache::newOneInBuffer() { Bomb* bomb = new Bomb(true); bomb->autorelease(); bufferVec.insert(bufferVec.end(),bomb); }
Bomb* Bomb::createBomb(bool full) { Bomb* b = new Bomb(full); b->autorelease(); return b; }
Bomb* Bomb::create(Player* player) { Bomb* bomb = new Bomb(); if (bomb && bomb->init(player)) { return (Bomb*)bomb->autorelease(); } CC_SAFE_DELETE(bomb); return bomb; }
Bomb* Bomb::createWithWorld ( b2World* pWorld ) { Bomb* pRet = new Bomb ( ); if ( pRet && pRet->initWithWorld ( pWorld ) ) { pRet->autorelease ( ); } else { CC_SAFE_DELETE ( pRet ); } return pRet; }