def onLeaveWorld(self):
     ScriptGameObject.deactivate(self)
     ScriptGameObject.destroy(self)
     if self.__clickSound is not None:
         if self.__clickSound.isPlaying:
             self.__clickSound.stop()
         self.__clickSound.releaseMatrix()
         self.__clickSound = None
     self.setHighlight(False)
     return
Ejemplo n.º 2
0
 def onLeaveWorld(self):
     LOG_DEBUG('onLeaveWorld')
     ScriptGameObject.deactivate(self)
     ScriptGameObject.destroy(self)
     DetachedTurret.allTurrets.remove(self)
     self.__detachConfirmationTimer.cancel()
     self.__detachConfirmationTimer = None
     self.__isBeingPulledCallback.destroy()
     self.__isBeingPulledCallback = None
     if self.__vehicleStickers is not None:
         self.__vehicleStickers.detach()
         self.__vehicleStickers = None
     return
 def __reload(self, vDesc, vState, outfit):
     self.__clearModelAnimators()
     self.__loadState.unload()
     if self.fashion is not None:
         self.fashion.removePhysicalTracks()
     ScriptGameObject.deactivate(self)
     self.tracks = None
     self.collisionObstaclesCollector = None
     self.tessellationCollisionSensor = None
     self.shadowManager = VehicleShadowManager()
     self.shadowManager.updatePlayerTarget(None)
     self.__outfit = outfit
     self.__startBuild(vDesc, vState)
     return
 def destroy(self):
     if self.fashion is not None:
         self.fashion.removePhysicalTracks()
     if self.shadowManager is not None:
         self.shadowManager.updatePlayerTarget(None)
     self.__clearModelAnimators()
     ScriptGameObject.deactivate(self)
     ScriptGameObject.destroy(self)
     self.__vDesc = None
     self.__vState = None
     self.__loadState.unload()
     self.__loadState.destroy()
     self.__loadState = None
     self.__curBuildInd = 0
     self.__vEntity = None
     self.__onLoadedCallback = None
     self.__onLoadedAfterRefreshCallback = None
     self.turretRotator = None
     self.settingsCore.onSettingsChanged -= self.__onSettingsChanged
     self.itemsCache.onSyncCompleted -= self.__onItemsCacheSyncCompleted
     g_eventBus.removeListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED,
                               self.__handleEntityUpdated)
     g_currentVehicle.onChanged -= self.__onVehicleChanged
     return