def reset(self): for key in self.boardsPool.keys(): board = self.boardsPool[key] board.removeNode() self.boardsPool.clear() if self.currentBoard: self.currentBoard.removeNode() self.currentBoard = None if self.onDeckBoard: self.onDeckBoard.removeNode() self.onDeckBoard = None for boardIndex in self.currentDifficultySet: boardIndex -= 1 if 'copy1_%s' % boardIndex not in self.boardsPool: board = self.getNewBoard(boardIndex) self.boardsPool['copy1_%s' % boardIndex] = board if 'copy2_%s' % boardIndex not in self.boardsPool: board = self.getNewBoard(boardIndex) self.boardsPool['copy2_%s' % boardIndex] = board self.currentBoardIndex = 0 self.currentBoard = None self.moveNewBoardOnDeck() self.onDeckBoard.unstash() self.totalScore = 0 self.startPositions = (Point3(0.0, 0.0, 0.0), ) self.sawButton.stash() self.sawButton.reparentTo(self) self.lastHitIndex = -1 self.moveDiffForSound = 0.0 RepairMincroGame.reset(self) self.repairGame.gui.setTutorial(self.name) self.repairGame.gui.setTitle(self.name) return
def reset(self): RepairMincroGame.reset(self) self.lastMousePos = Point2(0.0, 0.0) self.isMouseDown = False self.randomizeBoard() self.repairGame.gui.setTutorial(self.name) self.brush.stash() self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.lastMousePos = Point2(0.0, 0.0) self.isMouseDown = False self.randomizeBoard() self.repairGame.gui.setTutorial(self.name) self.brush.stash() self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.randomizeBoard() tutorialIndex = 0 self.linesComplete = 0 self.lastLineCompleteTime = globalClock.getRealTime() if len(self.currentGridDimensionAndLineCount[1]) > 1: tutorialIndex = 1 self.repairGame.gui.setTutorial(self.name, tutorialIndex) self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.randomizeBoard() tutorialIndex = 0 self.linesComplete = 0 self.lastLineCompleteTime = globalClock.getRealTime() if len(self.currentGridDimensionAndLineCount[1]) > 1: tutorialIndex = 1 self.repairGame.gui.setTutorial(self.name, tutorialIndex) self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.remainingWater = WATER_LEVEL_START self.chainCount = 0 self.barDirection = UP self.goalIndex = TOP self.barPercent = 0.0 self.failedPercentAndDirection = (-1.0, UP) actualZ = self.goalPositions[BOTTOM].getZ() actualZ -= self.visual.getZ() self.pumpLine.setZ(actualZ) self.setGoalIndex(TOP) self.pumpHandle.setR(ROTATION_MIN) self.waterMeter.setSz(WATER_LEVEL_START) self.waterTop.setZ(self.waterMeterTopLoc.getZ(self.visual)) self.ghostLine.stash() self.setPumpWater(1.0) self.failLabel.stash() self.greatLabel.stash() self.repairGame.gui.setTutorial(self.name) self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.remainingWater = WATER_LEVEL_START self.chainCount = 0 self.barDirection = UP self.goalIndex = TOP self.barPercent = 0.0 self.failedPercentAndDirection = (-1.0, UP) actualZ = self.goalPositions[BOTTOM].getZ() actualZ -= self.visual.getZ() self.pumpLine.setZ(actualZ) self.setGoalIndex(TOP) self.pumpHandle.setR(ROTATION_MIN) self.waterMeter.setSz(WATER_LEVEL_START) self.waterTop.setZ(self.waterMeterTopLoc.getZ(self.visual)) self.ghostLine.stash() self.setPumpWater(1.0) self.failLabel.stash() self.greatLabel.stash() self.repairGame.gui.setTutorial(self.name) self.repairGame.gui.setTitle(self.name)
def reset(self): RepairMincroGame.reset(self) self.aim = 1.0 self.hammerSwinging = False self.circleDirection = GROW self.currentMin = 0.0 self.circle.setScale(self.config.reticleScaleRange[1]) spacing = 1.6000000000000001 / (self.nailCount + 2) self.currentNails = [] i = 0 for nail in self.nails: if i < self.nailCount: nail.setPos(-0.80000000000000004 + spacing * 1.5 + spacing * i, -2.0, 0.10000000000000001) nail.request('Active') nail.unstash() self.currentNails.append(nail) else: nail.request('Idle') i += 1 self.repairGame.gui.setTutorial(self.name) self.repairGame.gui.setTitle(self.name)
def reset(self): for key in self.boardsPool.keys(): board = self.boardsPool[key] board.removeNode() self.boardsPool.clear() if self.currentBoard: self.currentBoard.removeNode() self.currentBoard = None if self.onDeckBoard: self.onDeckBoard.removeNode() self.onDeckBoard = None for boardIndex in self.currentDifficultySet: boardIndex -= 1 if 'copy1_%s' % boardIndex not in self.boardsPool: board = self.getNewBoard(boardIndex) self.boardsPool['copy1_%s' % boardIndex] = board if 'copy2_%s' % boardIndex not in self.boardsPool: board = self.getNewBoard(boardIndex) self.boardsPool['copy2_%s' % boardIndex] = board continue self.currentBoardIndex = 0 self.currentBoard = None self.moveNewBoardOnDeck() self.onDeckBoard.unstash() self.totalScore = 0 self.startPositions = (Point3(0.0, 0.0, 0.0),) self.sawButton.stash() self.sawButton.reparentTo(self) self.lastHitIndex = -1 self.moveDiffForSound = 0.0 RepairMincroGame.reset(self) self.repairGame.gui.setTutorial(self.name) self.repairGame.gui.setTitle(self.name)