def recreate(self, vDesc, vState, callback):
     ComponentSystem.deactivate(self)
     self.shadowManager = VehicleShadowManager()
     self.shadowManager.updatePlayerTarget(None)
     self.__onLoadedCallback = callback
     self.__outfit = self.__getActiveOutfit()
     self.__loadState.unload()
     self.__startBuild(vDesc, vState)
     return
Example #2
0
 def onLeaveWorld(self):
     ComponentSystem.deactivate(self)
     ComponentSystem.destroy(self)
     if self.__clickSound is not None:
         if self.__clickSound.isPlaying:
             self.__clickSound.stop()
         self.__clickSound.releaseMatrix()
         self.__clickSound = None
     self.highlight(False)
     return
Example #3
0
 def __reload(self, vDesc, vState, outfit):
     self.__loadState.unload()
     ComponentSystem.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 onLeaveWorld(self):
     ComponentSystem.deactivate(self)
     ComponentSystem.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 destroy(self):
     ComponentSystem.deactivate(self)
     ComponentSystem.destroy(self)
     self.__vDesc = None
     self.__vState = None
     self.__loadState.unload()
     self.__loadState.destroy()
     self.__loadState = None
     self.__curBuildInd = 0
     self.__vEntity = None
     self.settingsCore.onSettingsChanged -= self.__onSettingsChanged
     self.itemsCache.onSyncCompleted -= self.__onItemsCacheSyncCompleted
     g_eventBus.removeListener(CameraRelatedEvents.CAMERA_ENTITY_UPDATED,
                               self.__handleEntityUpdated)
     return
 def destroy(self):
     ComponentSystem.deactivate(self)
     ComponentSystem.destroy(self)
     self.__onLoadedCallback = None
     self.__vDesc = None
     self.__vState = None
     self.__isLoaded = False
     self.__curBuildInd = 0
     self.__vEntityId = None
     if self.__smCb is not None:
         BigWorld.cancelCallback(self.__smCb)
         self.__smCb = None
     if self.__smRemoveCb is not None:
         BigWorld.cancelCallback(self.__smRemoveCb)
         self.__smRemoveCb = None
     self.settingsCore.onSettingsChanged -= self.__onSettingsChanged
     self.itemsCache.onSyncCompleted -= self.__onItemsCacheSyncCompleted
     return
 def recreate(self, vDesc, vState, onVehicleLoadedCallback=None):
     ComponentSystem.deactivate(self)
     self.__onLoadedCallback = onVehicleLoadedCallback
     self.__isLoaded = False
     self.__startBuild(vDesc, vState)