Boss* Boss::create(Sprite* sprite, int ps) { Boss *boss = new Boss(); boss->m_Ps = (PowerEnumStatus)ps; //怪物类型 if (boss && boss->initWithFile(sprite)) { boss->autorelease(); return boss; } CC_SAFE_DELETE(boss); return NULL; }
Boss * Boss::create(const BossConfig * pConfig) { Boss * ret = NEW Boss(pConfig); ret->autorelease(); return ret; }