本文整理汇总了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
示例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)
示例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
示例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]
示例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))
示例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]