def unload(self): self.unloadBattleAnims() globalPropPool.unloadProps() globalBattleSoundCache.clear() BattleParticles.unloadParticles() self.parentFSMState.removeChild(self.fsm) del self.parentFSMState del self.fsm del self.streetClass self.landmarkBlocks.removeNode() del self.landmarkBlocks self.hood.dnaStore.resetSuitPoints() self.hood.dnaStore.resetBattleCells() del self.hood del self.nodeDict del self.zoneDict del self.fadeInDict del self.fadeOutDict del self.nodeList self.geom.removeNode() del self.geom self.townBattle.unload() self.townBattle.cleanup() del self.townBattle del self.battleMusic del self.music del self.activityMusic del self.holidayPropTransforms self.deleteAnimatedProps() cleanupDialog('globalDialog') ModelPool.garbageCollect() TexturePool.garbageCollect()
def destroy(self): if self.isDestroyed: return self.isDestroyed = True if hasattr(self.suit, 'prop') and self.suit.prop: self.suit.prop.stash() if self.propTrack: self.propTrack.finish() self.propTrack = None if self.suitSound: self.suitSound.stop() del self.suitSound if self.animTrack: self.animTrack.finish() self.animTrack = None if self.shotTrack != None: self.shotTrack.finish() self.shotTrack = None if self.deathTrack != None: self.deathTrack.finish() self.deathTrack = None if self.deathSuit: self.deathSuit.detachNode() self.suit.cleanupLoseActor() self.deathSuit = None if self.moveIval: self.moveIval.pause() del self.moveIval if self.suit: self.suit.delete() self.suit = None BattleParticles.unloadParticles() self.ignore(self.game.uniqueName('enter' + self.suitName)) self.game = None self.enemyMgr = None return
def destroy(self): BattleParticles.unloadParticles() self.ignoreAll() self._destroySfx() CogdoMazeSplattable.destroy(self) MazeSuit.destroy(self)