本文整理汇总了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