예제 #1
0
    def _stopBattleSession(self):
        """This method is invoked when battle stops."""
        ctrl = self.sessionProvider.shared.vehicleState
        if ctrl is not None:
            ctrl.onPostMortemSwitched -= self.__onPostMortemSwitched
        aih_global_binding.unsubscribe(
            aih_global_binding.BINDING_ID.CTRL_MODE_NAME,
            self.__onAvatarCtrlModeChanged)
        self.sessionProvider.removeViewComponent(_ALIASES.HIT_DIRECTION)
        for component in self._external:
            component.stopPlugins()

        return
예제 #2
0
    def _stopBattleSession(self):
        ctrl = self.sessionProvider.shared.vehicleState
        if ctrl is not None:
            ctrl.onPostMortemSwitched -= self._onPostMortemSwitched
            ctrl.onRespawnBaseMoving -= self.__onRespawnBaseMoving
        aih_global_binding.unsubscribe(aih_global_binding.BINDING_ID.CTRL_MODE_NAME, self._onAvatarCtrlModeChanged)
        for alias, _ in self.__componentsConfig.getViewsConfig():
            self.sessionProvider.removeViewComponent(alias)

        for component in self._external:
            component.stopPlugins()

        return
 def stopControl(self):
     self.__eManager.clear()
     self.settingsCore.interfaceScale.onScaleChanged -= self.__onScaleFactorChanged
     aih_global_binding.unsubscribe(_BINDING_ID.SPG_SHOTS_INDICATOR_STATE, self.__onSPGShotsIndicatorStateChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.CTRL_MODE_NAME, self.__onAvatarControlModeChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.AIM_OFFSET, self.__onAimOffsetChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.CLIENT_GUN_MARKER_STATE, self.__onClientGunMarkerStateChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.SERVER_GUN_MARKER_STATE, self.__onServerGunMarkerStateChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.ZOOM_FACTOR, self.__onZoomFactorChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.STRATEGIC_CAMERA, self.__onStrategicCameraChanged)
     for bindingID in _GUN_MARKERS_SET_IDS:
         aih_global_binding.unsubscribe(bindingID, self.__onGunMarkersSetChanged)
 def stop(self):
     aih_global_binding.unsubscribe(BINDING_ID.AIM_OFFSET,
                                    self.__onAimOffsetChanged)
예제 #5
0
 def stopControl(self):
     """ Stops to control."""
     self.__eManager.clear()
     self.settingsCore.interfaceScale.onScaleChanged -= self.__onScaleFactorChanged
     aih_global_binding.unsubscribe(_BINDING_ID.CTRL_MODE_NAME,
                                    self.__onAvatarControlModeChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.AIM_OFFSET,
                                    self.__onAimOffsetChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.CLIENT_GUN_MARKER_STATE,
                                    self.__onClientGunMarkerStateChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.SERVER_GUN_MARKER_STATE,
                                    self.__onServerGunMarkerStateChanged)
     aih_global_binding.unsubscribe(_BINDING_ID.ZOOM_FACTOR,
                                    self.__onZoomFactorChanged)
     for bindingID in _GUN_MARKERS_SET_IDS:
         aih_global_binding.unsubscribe(bindingID,
                                        self.__onGunMarkersSetChanged)