Example #1
0
 def tick(self):
     nextScene, isInScene = self._tutorial.getNextScene(self._gui.getSceneID())
     if isInScene:
         self._tutorial.setFunctionalScene(nextScene)
         postEffects = nextScene.getPostEffects()
         postEffects = filter(lambda item: functional.FunctionalConditions(item.getConditions()).allConditionsOk(), postEffects)
         self._isAllowedToSwitch = True
         if len(postEffects):
             self._tutorial.storeEffectsInQueue(postEffects)
         else:
             self._tutorial.evaluateState()
 def __checkScene(self, _=None):
     nextScene, isInScene = self._tutorial.getNextScene(
         self._gui.getSceneID())
     if isInScene:
         self._tutorial.setFunctionalScene(nextScene)
         postEffects = nextScene.getPostEffects()
         postEffects = [
             item for item in postEffects
             if functional.FunctionalConditions(
                 item.getConditions()).allConditionsOk()
         ]
         self._isAllowedToSwitch = True
         if postEffects:
             self._tutorial.storeEffectsInQueue(postEffects)
         else:
             self._tutorial.evaluateState()