當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。