本文整理汇总了Python中Level.Level.Setup方法的典型用法代码示例。如果您正苦于以下问题:Python Level.Setup方法的具体用法?Python Level.Setup怎么用?Python Level.Setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Level.Level
的用法示例。
在下文中一共展示了Level.Setup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: introsetup
# 需要导入模块: from Level import Level [as 别名]
# 或者: from Level.Level import Setup [as 别名]
'''
intro._look = '''The mean streets of Cybercity swim below, glistening rain-flecked cars rushing in either direction,
traffic appearing and disappearing like ones and zeroes in the bitstream, insert serial bus joke. On the other side of the street, hackers hang out by the neon-lit "Import-Export",
hacking fingers itchy from underuse, ready for a fight. Just another day in Cybercity. Except it looks like it's night because cyberpunk.'''
intro._death = '''A cyberpigeon craps on you, rancid droppings seeping into a cut inflicted by the barber as they shaved your cool cyber-do.
Weeks later, in hospital, you succumb to the bit rot.'''
def introsetup(game):
vars = game.Vars()
vars["inventory"] = ["sword", "haxsnax"]
if "trex" in vars:
vars.pop("trex")
if "cyberogres" in vars:
vars.pop("cyberogres")
if "llama" in vars:
vars.pop("llama")
intro.Setup = introsetup
# -------------------------------------------------- #
streets = Level("streets")
streets._text = '''You land on the mean streets of Cybercity. Cars rush past, glittering like rain-flecked pearls in the neon streetlamps,
even though it's like noon, because this is cyberpunk and actual sunlight is illegal or something. There are two cyberogres in front of you,
having patiently observed you as you glide to the ground. A feral $ANIMALNAME stares at the scene from an alleyway.'''
streets._look = '''The cyberogres look mean! Better hope you have a weapon, $PLAYERNAME, or you're bit-toast.'''
streets._death = '''You see a bitcoin on the street and bend down to pick it up. You are killed by a combination of crippling deflation,
wild value fluctuations and the fevered masturbation fantasies of people who live in the mountains and hide gold under their mattresses.'''
def streetssetup(game):
game.Vars()["cyberogres"] = Animals.MakeAnimal("cyberogres")
animalname = game.Vars()["animalname"]
game.Vars()[animalname] = Animals.MakeAnimal(animalname)