Beispiel #1
0
    def stop(self):
        self.__isStarted = False
        import SoundGroups
        SoundGroups.g_instance.changePlayMode(0)
        aih_global_binding.clear()
        for control in self.__ctrls.itervalues():
            control.destroy()

        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isRecording:
            replayCtrl.setPlayerVehicleID(0)
        if self.__remoteCameraSender is not None:
            self.__remoteCameraSender.destroy()
            self.__remoteCameraSender = None
        self.onCameraChanged.clear()
        self.onCameraChanged = None
        self.onPostmortemVehicleChanged.clear()
        self.onPostmortemVehicleChanged = None
        self.onPostmortemKillerVisionEnter.clear()
        self.onPostmortemKillerVisionEnter = None
        self.onPostmortemKillerVisionExit.clear()
        self.onPostmortemKillerVisionExit = None
        self.__targeting.enable(False)
        self.__killerVehicleID = None
        if self.__onRecreateDevice in g_guiResetters:
            g_guiResetters.remove(self.__onRecreateDevice)
        BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
        self.settingsCore.onSettingsChanged -= self.__onSettingsChanged
        BigWorld.player().consistentMatrices.onVehicleMatrixBindingChanged -= self.__onVehicleChanged
        ComponentSystem.destroy(self)
        CallbackDelayer.destroy(self)
        return
 def fini(self):
     self.__ctx = None
     g_guiResetters.remove(self.__projectionChangeHandler)
     self._settingsCore.onSettingsApplied -= self.__projectionChangeHandler
     g_eventBus.removeListener(events.HangarCameraManagerEvent.ON_CREATE, self.__onCreateHangarCameraManager, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventBus.removeListener(events.HangarCameraManagerEvent.ON_DESTROY, self.__onDestroyHangarCameraManager, scope=EVENT_BUS_SCOPE.LOBBY)
     self.__destroyCameras()
     return
Beispiel #3
0
 def onHide(self):
     self.__isActive = False
     self.__scrollUpdateTimer.stop()
     if self.__changeResCallbackID is not None:
         BigWorld.cancelCallback(self.__changeResCallbackID)
         self.__changeResCallbackID = None
     cameraSwitcher = self.customizableObjectsMgr.getSwitchHandler(
         CameraSwitcher)
     if cameraSwitcher is not None:
         cameraSwitcher.removeScrollListener(self.__onScrollEvent)
     g_guiResetters.remove(self.__onChangeScreenResolution)
     return
Beispiel #4
0
    def stop(self):
        self.__isStarted = False
        for control in self.__ctrls.itervalues():
            control.destroy()

        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isRecording:
            replayCtrl.setPlayerVehicleID(0)
        self.onCameraChanged = None
        self.__targeting.enable(False)
        self.__killerVehicleID = None
        g_guiResetters.remove(self.__onRecreateDevice)
        BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
        from account_helpers.SettingsCore import g_settingsCore
        g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
        return
Beispiel #5
0
 def _dispose(self):
     g_clientUpdateManager.removeObjectCallbacks(self)
     self._marathonsCtrl.onFlagUpdateNotify -= self.update
     self._eventsCache.onSyncCompleted -= self.update
     self._eventsCache.onProgressUpdated -= self.update
     self._festivityController.onStateChanged -= self.update
     self.__battlePassController.onSeasonStateChange -= self.update
     self.__rankedController.onGameModeStatusUpdated -= self.update
     self._currentVehicle = None
     self.__screenWidth = None
     if self._eventsController:
         self._eventsController.removeListener(self)
     self.removeListener(events.TutorialEvent.SET_HANGAR_HEADER_ENABLED, self.__onSetHangarHeaderEnabled, scope=EVENT_BUS_SCOPE.LOBBY)
     self._lobbyContext.getServerSettings().onServerSettingsChange -= self.__onServerSettingChanged
     g_guiResetters.remove(self.__onChangeScreenResolution)
     super(HangarHeader, self)._dispose()
     return
Beispiel #6
0
 def disable(self):
     from gui import g_guiResetters
     if self.__onRecreateDevice in g_guiResetters:
         g_guiResetters.remove(self.__onRecreateDevice)
     self.__setModelsToCollideWith([])
     self.__cam.speedTreeTarget = None
     BigWorld.camera(None)
     if self.__shiftKeySensor is not None:
         self.__shiftKeySensor.reset(Math.Vector3())
     self.stopCallback(self.__cameraUpdate)
     self.__movementOscillator.reset()
     self.__impulseOscillator.reset()
     self.__noiseOscillator.reset()
     self.__accelerationSmoother.reset()
     self.__autoUpdateDxDyDz.set(0)
     self.__inputInertia.teleport(self.__calcRelativeDist())
     FovExtended.instance().resetFov()
Beispiel #7
0
    def stop(self):
        self.__isStarted = False
        FMOD.setEventsParam('viewPlayMode', 0)
        self.__removeBattleCtrlListeners()
        for control in self.__ctrls.itervalues():
            control.destroy()

        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isRecording:
            replayCtrl.setPlayerVehicleID(0)
        self.onCameraChanged = None
        self.__targeting.enable(False)
        self.__killerVehicleID = None
        g_guiResetters.remove(self.__onRecreateDevice)
        BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
        from account_helpers.settings_core.SettingsCore import g_settingsCore
        g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
        CallbackDelayer.destroy(self)
Beispiel #8
0
    def stop(self):
        self.__isStarted = False
        import SoundGroups
        SoundGroups.g_instance.changePlayMode(0)
        self.__removeBattleCtrlListeners()
        for control in self.__ctrls.itervalues():
            control.destroy()

        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isRecording:
            replayCtrl.setPlayerVehicleID(0)
        self.onCameraChanged = None
        self.__targeting.enable(False)
        self.__killerVehicleID = None
        g_guiResetters.remove(self.__onRecreateDevice)
        BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
        from account_helpers.settings_core.SettingsCore import g_settingsCore
        g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
        CallbackDelayer.destroy(self)
Beispiel #9
0
 def removeHandler(self):
     if not self.__isSetHandler:
         return
     self.__isSetHandler = False
     player = BigWorld.player()
     if player:
         arena = player.arena
         if arena:
             arena.onPeriodChange -= self.onArenaPeriodChange
     session = dependency.instance(IBattleSessionProvider)
     ctl = session.shared.vehicleState
     if ctl:
         ctl.onVehicleStateUpdated -= self.onVehicleStateUpdated
     ctl = session.shared.crosshair
     if ctl:
         ctl.onCrosshairViewChanged -= self.onCrosshairViewChanged
         ctl.onCrosshairPositionChanged -= self.onCrosshairPositionChanged
     g_guiResetters.remove(self.onScreenResolutionChanged)
     g_keyEventHandlers.remove(self.__handleKeyEvent)
 def disable(self):
     from gui import g_guiResetters
     if self.__onRecreateDevice in g_guiResetters:
         g_guiResetters.remove(self.__onRecreateDevice)
     self.__setDynamicCollisions(False)
     self.__cam.speedTreeTarget = None
     if self.__shiftKeySensor is not None:
         self.__shiftKeySensor.reset(Math.Vector3())
     self.stopCallback(self.__cameraUpdate)
     self.__movementOscillator.reset()
     self.__impulseOscillator.reset()
     self.__noiseOscillator.reset()
     self.__accelerationSmoother.reset()
     self.__autoUpdateDxDyDz.set(0)
     self.__updatedByKeyboard = False
     dist = self.__calcRelativeDist()
     if dist is not None:
         self.__inputInertia.teleport(dist)
     FovExtended.instance().resetFov()
     return
Beispiel #11
0
    def stop(self):
        self.__isStarted = False
        import SoundGroups
        SoundGroups.g_instance.changePlayMode(1)
        self.__removeBattleCtrlListeners()
        for control in self.__ctrls.itervalues():
            control.destroy()

        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isRecording:
            replayCtrl.setPlayerVehicleID(0)
        self.onCameraChanged = None
        self.__targeting.enable(False)
        self.__killerVehicleID = None
        g_guiResetters.remove(self.__onRecreateDevice)
        BigWorld.player().arena.onPeriodChange -= self.__onArenaStarted
        from account_helpers.settings_core.SettingsCore import g_settingsCore
        g_settingsCore.onSettingsChanged -= self.__onSettingsChanged
        BigWorld.player().consistentMatrices.onVehicleMatrixBindingChanged -= self.__onVehicleChanged
        CallbackDelayer.destroy(self)
        return
Beispiel #12
0
 def destroy(self):
     g_guiResetters.remove(self.__onChangeScreenResolution)
     self.clear()
     self.__destroyMainWindow()
Beispiel #13
0
 def destroy(self):
     g_guiResetters.remove(self.__onChangeScreenResolution)
     self.clear()
     self.__destroyMainWindow()
Beispiel #14
0
 def fini(self):
     g_guiResetters.remove(self.__onProjectionChanged)
     self._settingsCore.onSettingsApplied -= self.__onProjectionChanged