本文整理匯總了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
示例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