def enterFlying(self): self.stateIndex = ButterflyGlobals.FLYING ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId) self.d_setState(ButterflyGlobals.FLYING, self.curIndex, self.destIndex, self.time) taskMgr.doMethodLater(self.time, self.__handleArrival, self.uniqueName('butter-flying')) return None
def delete(self): try: self.butterfly_deleted except: self.butterfly_deleted = 1 ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId) ButterflyGlobals.recycleIndex(self.destIndex, self.playground, self.area, self.ownerId) self.fsm.request('off') del self.fsm DistributedObjectAI.DistributedObjectAI.delete(self)