def startRules(self, timeout = PartyGlobals.DefaultRulesTimeout): self.notify.debug('BASE: startRules') self.accept(self.rulesDoneEvent, self.handleRulesDone) self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.getTitle(), self.getInstructions(), self.rulesDoneEvent, timeout) base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) self.rulesPanel.load() self.rulesPanel.enter()
def enterRules(self): if self.isLocal: self.notify.debug('enterNormal') self.setAnimState('Catching', 1.0) self.activity.orthoWalk.stop() # show the rules panel # most activities show the rules as part of their FSM # catch is always in 'Active' state, so show the rules as part of this separate FSM self.accept(self.activity.rulesDoneEvent, self.handleRulesDone) # The rules panel is an onscreen panel self.rulesPanel = MinigameRulesPanel( "PartyRulesPanel", self.activity.getTitle(), self.activity.getInstructions(), self.activity.rulesDoneEvent, PartyGlobals.DefaultRulesTimeout, ) # turn off use of all the bottom cells, and the cell nearest the bottom # on each side base.setCellsAvailable(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) self.rulesPanel.load() self.rulesPanel.enter() else: self.fsm.request('normal')
def enterIntro(self): assert self.notify.debugCall() base.cr.playGame.getPlace().fsm.request('Game') self._rulesDoneEvent = uniqueName('cogdoGameRulesDone') self.accept(self._rulesDoneEvent, self._handleRulesDone) self._rulesPanel = MinigameRulesPanel("MinigameRulesPanel", self.getTitle(), self.getInstructions(), self._rulesDoneEvent) self._rulesPanel.load() self._rulesPanel.enter()
def enterRules(self): if self.isLocal: self.notify.debug('enterNormal') self.setAnimState('Catching', 1.0) self.activity.orthoWalk.stop() self.accept(self.activity.rulesDoneEvent, self.handleRulesDone) self.rulesPanel = MinigameRulesPanel('PartyRulesPanel', self.activity.getTitle(), self.activity.getInstructions(), self.activity.rulesDoneEvent, PartyGlobals.DefaultRulesTimeout) base.setCellsActive(base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) self.rulesPanel.load() self.rulesPanel.enter() else: self.fsm.request('normal')
def startRules(self, timeout=PartyGlobals.DefaultRulesTimeout): self.notify.debug("BASE: startRules") self.accept(self.rulesDoneEvent, self.handleRulesDone) # The rules panel is an onscreen panel self.rulesPanel = MinigameRulesPanel( "PartyRulesPanel", self.getTitle(), self.getInstructions(), self.rulesDoneEvent, timeout, ) # turn off use of all the bottom cells, and the cell nearest the bottom # on each side base.setCellsAvailable( base.bottomCells + [base.leftCells[0], base.rightCells[1]], False) self.rulesPanel.load() self.rulesPanel.enter()