Treasure Chest is now destroyed properly

This commit is contained in:
DenialMC 2015-05-11 19:18:42 +03:00
parent afdd660152
commit 3e61bc9501

View file

@ -12,15 +12,16 @@ class DistributedTreasureChest(DistributedObject.DistributedObject):
self.createModel(45, -165.75, 0.025, 30) self.createModel(45, -165.75, 0.025, 30)
self.initCollisions() self.initCollisions()
def destroy(self): def delete(self):
self.ignore('enter' + self.cSphereNode.getName()) self.ignore('enter' + self.cSphereNode.getName())
self.cSphereNodePath.removeNode() self.cSphereNodePath.removeNode()
self.model.destroy() self.model.removeNode()
self.destroyFishGui() self.destroyFishGui()
del self.cSphere del self.cSphere
del self.cSphereNode del self.cSphereNode
del self.cSphereNodePath del self.cSphereNodePath
del self.model del self.model
DistributedObject.DistributedObject.delete(self)
def destroyFishGui(self): def destroyFishGui(self):
self.ignore('treasureChestSell') self.ignore('treasureChestSell')