def stop(self, finished=False): if self._tutorialStopped: return else: if self.__callbackID is not None: BigWorld.cancelCallback(self.__callbackID) self.__callbackID = None if self._funcScene is not None: self._funcScene.leave() if self._data is not None: self._data.clear() GlobalStorage.clearFlags() if self._sound is not None: self._sound.stop() self._sound = None if self._gui is not None: self._gui.fini() self._gui = None if finished: self._cache.setFinished(True).write() else: self._cache.update( self._currentChapter, self._flags.getDict() if self._flags else None) self._cache = None g_tutorialWeaver.clear() clearTutorialProxy() self.removeEffectsInQueue() self._nextChapter = False self._tutorialStopped = True self._initialized = 0 return
def stop(self, finished = False, reason = TUTORIAL_STOP_REASON.DEFAULT): if self._tutorialStopped: return else: if self.__callbackID is not None: BigWorld.cancelCallback(self.__callbackID) self.__callbackID = None if self._funcScene is not None: self._funcScene.leave() if self._data is not None: self._data.clear() GlobalStorage.clearFlags() if self._sound is not None: self._sound.stop() self._sound = None if self._gui is not None: self._gui.fini(isItemsRevert=self._descriptor.isItemsRevertIfStop(reason)) self._gui = None if finished: self._cache.setFinished(True).write() else: self._cache.update(self._currentChapter, self._flags.getDict() if self._flags else None) self._cache = None g_tutorialWeaver.clear() clearTutorialProxy() self.removeEffectsInQueue() self._nextChapter = False self._tutorialStopped = True self._initialized = 0 return
def stop(self, finished=False, reason=TUTORIAL_STOP_REASON.DEFAULT): if self._stopped: return if self.__callbackID is not None: BigWorld.cancelCallback(self.__callbackID) self.__callbackID = None if self._funcScene is not None: self._funcScene.leave() if self._data is not None: self._data.clear() GlobalStorage.clearFlags() if self._sound is not None: self._sound.stop() self._sound = None if self._gui is not None: self._gui.fini( isItemsRevert=self._descriptor.isItemsRevertIfStop(reason)) self._gui = None if finished: self._cache.setFinished(True).write() else: self._cache.update(self._currentChapter, self._flags.getDict() if self._flags else None) self._cache = None g_tutorialWeaver.clear() clearTutorialProxy() self.removeEffectsInQueue() self._nextChapter = False self._stopped = True self._initialized = 0 self._triggeredEffects.clear() self.onStopped()
def stop(self, finished=False): """ Stops the process of training. :param finished: if it equals True than training completed. """ if self._stopped: return else: if self.__callbackID is not None: BigWorld.cancelCallback(self.__callbackID) self.__callbackID = None if self._funcScene is not None: self._funcScene.leave() if self._data is not None: self._data.clear() GlobalStorage.clearFlags() if self._sound is not None: self._sound.stop() self._sound = None if self._gui is not None: self._gui.fini() self._gui = None if finished: self._cache.setFinished(True).write() else: self._cache.update( self._currentChapter, self._flags.getDict() if self._flags else None) self._cache = None g_tutorialWeaver.clear() clearTutorialProxy() self.removeEffectsInQueue() self._nextChapter = False self._stopped = True self._initialized = 0 self._triggeredEffects.clear() self.onStopped() return
def stop(self, finished = False): """ Stops the process of training. :param finished: if it equals True than training completed. """ if self._stopped: return else: if self.__callbackID is not None: BigWorld.cancelCallback(self.__callbackID) self.__callbackID = None if self._funcScene is not None: self._funcScene.leave() if self._data is not None: self._data.clear() GlobalStorage.clearFlags() if self._sound is not None: self._sound.stop() self._sound = None if self._gui is not None: self._gui.fini() self._gui = None if finished: self._cache.setFinished(True).write() else: self._cache.update(self._currentChapter, self._flags.getDict() if self._flags else None) self._cache = None g_tutorialWeaver.clear() clearTutorialProxy() self.removeEffectsInQueue() self._nextChapter = False self._stopped = True self._initialized = 0 self._triggeredEffects.clear() self.onStopped() return