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


Python RepairMincroGame.setDifficulty方法代码示例

本文整理汇总了Python中RepairMincroGame.RepairMincroGame.setDifficulty方法的典型用法代码示例。如果您正苦于以下问题:Python RepairMincroGame.setDifficulty方法的具体用法?Python RepairMincroGame.setDifficulty怎么用?Python RepairMincroGame.setDifficulty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RepairMincroGame.RepairMincroGame的用法示例。


在下文中一共展示了RepairMincroGame.setDifficulty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     dif = self.config.barnacleCountRange[1] - self.config.barnacleCountRange[0]
     self.barnacleCount = int(math.floor(self.config.barnacleCountRange[0] + dif * percent))
     dif = self.config.barnacleHPScaleRange[1] - self.config.barnacleHPScaleRange[0]
     self.barnacleHPScale = self.config.barnacleHPScaleRange[0] + dif * percent
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:9,代码来源:RepairCareeningGame.py

示例2: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     dif = self.config.pumpPowerRange[0] - self.config.pumpPowerRange[1]
     self.pumpRate = self.config.pumpPowerRange[0] - dif * percent
     dif = self.config.barStartRange[0] - self.config.barStartRange[1]
     self.currentBarRate = self.config.barStartRange[0] - dif * percent
     dif = self.config.hitRange[0] - self.config.hitRange[1]
     self.hitRange = self.config.hitRange[0] - dif * percent
     self.goalBox.setSz((self.hitRange / 0.17999999999999999) * self.goalBoxStartScale)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:12,代码来源:RepairPumpingGame.py

示例3: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     dif = self.config.leakCountRange[1] - self.config.leakCountRange[0]
     self.leakCount = int(math.floor(self.config.leakCountRange[0] + dif * percent))
     dif = self.config.maxLeaksRange[1] - self.config.maxLeaksRange[0]
     self.maxLeaks = int(math.floor(self.config.maxLeaksRange[0] + dif * percent))
     dif = self.config.spawnDelayRange[1] - self.config.spawnDelayRange[0]
     self.minSpawnTime = self.config.spawnDelayRange[0] + dif * percent
     dif = self.config.spawnDelayRange[3] - self.config.spawnDelayRange[2]
     self.maxSpawnTime = self.config.spawnDelayRange[2] + dif * percent
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:13,代码来源:RepairPitchingGame.py

示例4: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     difIndex = int(math.floor(percent * (len(self.config.difficultyLevels) - 1)))
     self.currentGridDimensionAndLineCount = self.config.difficultyLevels[difIndex]
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairBracingGame.py

示例5: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     dif = self.config.nailCountRange[1] - self.config.nailCountRange[0]
     self.nailCount = int(math.floor(self.config.nailCountRange[0] + dif * percent))
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairHammeringGame.py

示例6: setDifficulty

# 需要导入模块: from RepairMincroGame import RepairMincroGame [as 别名]
# 或者: from RepairMincroGame.RepairMincroGame import setDifficulty [as 别名]
 def setDifficulty(self, difficulty):
     RepairMincroGame.setDifficulty(self, difficulty)
     percent = difficulty / self.repairGame.difficultyMax
     difIndex = int(math.floor(percent * (len(self.config.difficultySets) - 1)))
     self.currentDifficultySet = self.config.difficultySets[difIndex]
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:7,代码来源:RepairSawingGame.py


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