Tank* Tank::createTankWithTankType(const char* tankTypeName, TileMapInfo* tileMapInfo) { SpriteFrameCache* pCache = SpriteFrameCache::getInstance(); pCache->addSpriteFramesWithFile("tank.plist"); Tank* tank = new Tank(); tank->initTankWithTankType(tankTypeName, tileMapInfo); tank->autorelease(); return tank; }
Tank* Tank::createTankWithTankType(const char* tankTypeName, TileMapInfo* tileMapInfo) { CCSpriteFrameCache* pCache = CCSpriteFrameCache::sharedSpriteFrameCache(); pCache->addSpriteFramesWithFile("tank.plist"); initActionSet(); Tank* tank = new Tank(); tank->initTankWithTankType(tankTypeName, tileMapInfo); tank->autorelease(); return tank; }