예제 #1
0
    def cleanup(self):
        if self.blastModel is not None:
            self.blastModel.removeNode()
            self.blastModel = None

        if self.collider is not None and not self.collider.isEmpty():
            self.collider.clearPythonTag(TAG_OWNER)
            self.collider.removeNode()
        self.collider = None

        GameObject.cleanup(self)
예제 #2
0
    def cleanup(self):
        if self.uiRoot is not None:
            self.uiRoot.removeNode()
            self.uiRoot = None
        self.healthBar = None
        self.weaponUIRoot = None

        if self.lightNP is not None:
            render.clearLight(self.lightNP)
            self.lightNP.removeNode()
            self.lightNP = None

        for effect in self.updatingEffects:
            effect.cleanup()
        self.updatingEffects = []

        ArmedObject.cleanup(self)
        Walker.cleanup(self)
        GameObject.cleanup(self)