本文整理匯總了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]