コード例 #1
0
 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
コード例 #2
0
ファイル: __init__.py プロジェクト: webiumsk/WoT
 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
コード例 #3
0
 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()
コード例 #4
0
ファイル: __init__.py プロジェクト: webiumsk/WOT-0.9.17-CT
 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
コード例 #5
0
ファイル: __init__.py プロジェクト: webiumsk/WOT-0.9.15.1
 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