added destroy()

This commit is contained in:
Dave Schuyler 2003-09-17 01:56:02 +00:00
parent e6f847c64b
commit 350c151f87
2 changed files with 11 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class DistributedInteractiveEntity(DistributedEntity.DistributedEntity):
""" """
assert(self.debugPrint("generate()")) assert(self.debugPrint("generate()"))
DistributedEntity.DistributedEntity.generate(self) DistributedEntity.DistributedEntity.generate(self)
def disable(self): def disable(self):
assert(self.debugPrint("disable()")) assert(self.debugPrint("disable()"))
# Go to the off state when the object is put in the cache # Go to the off state when the object is put in the cache

View File

@ -90,6 +90,15 @@ class LogicGateAI(Entity.Entity, PandaObject.PandaObject):
self.setLogicType(self.logicType) self.setLogicType(self.logicType)
self.setInput_input1_bool(self.input_input1_bool) self.setInput_input1_bool(self.input_input1_bool)
self.setInput_input2_bool(self.input_input2_bool) self.setInput_input2_bool(self.input_input2_bool)
def destroy(self):
assert(self.debugPrint("destroy()"))
self.ignore(self.input1)
self.input1 = None
self.ignore(self.input2)
self.input2 = None
Entity.Entity.destroy(self)
PandaObject.PandaObject.destroy(self)
def setLogicType(self, logicType): def setLogicType(self, logicType):
assert(self.debugPrint("setLogicType(logicType=%s)"%(logicType,))) assert(self.debugPrint("setLogicType(logicType=%s)"%(logicType,)))
@ -128,5 +137,5 @@ class LogicGateAI(Entity.Entity, PandaObject.PandaObject):
self.accept(self.input2, self.setIsInput2) self.accept(self.input2, self.setIsInput2)
def getName(self): def getName(self):
#return "orLoEntity-%s"%(self.entId,) #return "logicGate-%s"%(self.entId,)
return "switch-%s"%(self.entId,) return "switch-%s"%(self.entId,)