本文整理汇总了Python中Player.getHunger方法的典型用法代码示例。如果您正苦于以下问题:Python Player.getHunger方法的具体用法?Python Player.getHunger怎么用?Python Player.getHunger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player.getHunger方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: deadCondition
# 需要导入模块: import Player [as 别名]
# 或者: from Player import getHunger [as 别名]
def deadCondition(self):
if(Player.getHunger()[0]<=0):
self.log.add_event("Creo que no me siento bien... *cae*",250)
#self.log.add_event("Presiona enter para continuar")
self.info.gameOver()
return True
return False
示例2: resetHungerFlags
# 需要导入模块: import Player [as 别名]
# 或者: from Player import getHunger [as 别名]
def resetHungerFlags(self):
percentage = Player.getHunger()[0]
if percentage>=6 and self.hunger_flag_0:
self.hunger_flag_0 = False
if percentage>=26 and self.hunger_flag_2:
self.hunger_flag_2 = False
if percentage>=50 and self.hunger_flag_3:
self.hunger_flag_3 = False
示例3: showHungerMessages
# 需要导入模块: import Player [as 别名]
# 或者: from Player import getHunger [as 别名]
def showHungerMessages(self):
percentage = Player.getHunger()[0]
if percentage <= 0 and not self.hunger_flag_1:
self.hunger_flag_1 = True
#time.sleep(3)
if percentage ==5 and not self.hunger_flag_0:
self.hunger_flag_0 = True
self.log.add_event("No se cuanto mas me pueda mover... necesito comer algo", 197)
elif percentage == 25 and not self.hunger_flag_2:
self.hunger_flag_2 = True
self.log.add_event("Me esta empezando a doler el estomago", 167)
elif percentage == 49 and not self.hunger_flag_3:
self.hunger_flag_3 = True
self.log.add_event("Tengo un poco de hambre, deberia comer algo", 167)