當前位置: 首頁>>代碼示例>>Python>>正文


Python GlobalStorage.clearFlags方法代碼示例

本文整理匯總了Python中tutorial.control.context.GlobalStorage.clearFlags方法的典型用法代碼示例。如果您正苦於以下問題:Python GlobalStorage.clearFlags方法的具體用法?Python GlobalStorage.clearFlags怎麽用?Python GlobalStorage.clearFlags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在tutorial.control.context.GlobalStorage的用法示例。


在下文中一共展示了GlobalStorage.clearFlags方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: stop

# 需要導入模塊: from tutorial.control.context import GlobalStorage [as 別名]
# 或者: from tutorial.control.context.GlobalStorage import clearFlags [as 別名]
 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
開發者ID:webiumsk,項目名稱:WoT,代碼行數:32,代碼來源:__init__.py

示例2: stop

# 需要導入模塊: from tutorial.control.context import GlobalStorage [as 別名]
# 或者: from tutorial.control.context.GlobalStorage import clearFlags [as 別名]
 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
開發者ID:webiumsk,項目名稱:WOT-0.9.15.1,代碼行數:38,代碼來源:__init__.py


注:本文中的tutorial.control.context.GlobalStorage.clearFlags方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。