当前位置: 首页>>代码示例>>Python>>正文


Python RepairMincroGame.reset方法代码示例

本文整理汇总了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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:10,代码来源:RepairCareeningGame.py

示例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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:13,代码来源:RepairBracingGame.py

示例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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:23,代码来源:RepairPumpingGame.py

示例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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:24,代码来源:RepairHammeringGame.py

示例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)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:40,代码来源:RepairSawingGame.py


注:本文中的RepairMincroGame.RepairMincroGame.reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。