本文整理匯總了Python中RepairMincroGame.RepairMincroGame.reset方法的典型用法代碼示例。如果您正苦於以下問題:Python RepairMincroGame.reset方法的具體用法?Python RepairMincroGame.reset怎麽用?Python RepairMincroGame.reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RepairMincroGame.RepairMincroGame
的用法示例。
在下文中一共展示了RepairMincroGame.reset方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: reset
# 需要導入模塊: from RepairMincroGame import RepairMincroGame [as 別名]
# 或者: from RepairMincroGame.RepairMincroGame import reset [as 別名]
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)
示例2: reset
# 需要導入模塊: from RepairMincroGame import RepairMincroGame [as 別名]
# 或者: from RepairMincroGame.RepairMincroGame import reset [as 別名]
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)
示例3: reset
# 需要導入模塊: from RepairMincroGame import RepairMincroGame [as 別名]
# 或者: from RepairMincroGame.RepairMincroGame import reset [as 別名]
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)
示例4: reset
# 需要導入模塊: from RepairMincroGame import RepairMincroGame [as 別名]
# 或者: from RepairMincroGame.RepairMincroGame import reset [as 別名]
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)
示例5: reset
# 需要導入模塊: from RepairMincroGame import RepairMincroGame [as 別名]
# 或者: from RepairMincroGame.RepairMincroGame import reset [as 別名]
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)