当前位置: 首页>>代码示例>>Python>>正文


Python Map.lvrange方法代码示例

本文整理汇总了Python中Map.Map.lvrange方法的典型用法代码示例。如果您正苦于以下问题:Python Map.lvrange方法的具体用法?Python Map.lvrange怎么用?Python Map.lvrange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Map.Map的用法示例。


在下文中一共展示了Map.lvrange方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Map

# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import lvrange [as 别名]
# outside2######################################################################################
outside2width = 900
rgrassland = graphics.grassland(900, 500, rightpath = False, uppath = True)
outsideheight = GR[rgrassland]["h"]
b = GR[rgrassland]["w"] / 10
outside2 = Map(rgrassland, [])
outside2.populate_with("pinetree", 22)
outside2.populate_with("greyrock", 3)
outside2.populate_with("flower", randint(0, 1))

outside2.exitareas = [
    Exit("left", False, 'outside1', "right", "same"),
    Exit("top", False, 'outside3', "same", "bottom")]
outside2.enemies = enemies.woodsenemies
outside2.lvrange = [1]


# outside3######################################################################################
rgrassland = graphics.grassland(outside2width, 500, leftpath = False, downpath = True)
b = GR[rgrassland]["w"] / 10
outsideheight = GR[rgrassland]["h"]
outside3 = Map(rgrassland, [])
outside3.populate_with("greyrock", 4)
outside3.populate_with("pinetree", 12)
outside3.populate_with("flower", randint(0, 2))
outside3.exitareas = [Exit("bottom", False, "outside2", "same", "top"),
                      Exit("right", False, "outside5", "left", "same")]
outside3.enemies = enemies.woodsenemies
outside3.lvrange = [1, 2]
开发者ID:oflatt,项目名称:pythonRpgProject,代码行数:31,代码来源:forestmaps.py

示例2: randint

# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import lvrange [as 别名]
outside1.populate_with("pinetree", 4, [cleararearect])
outside1.populate_with("flower", randint(3, 7), [cleararearect])

outsidewidth = GR[rgrassland]["w"]
outsideheight = GR[rgrassland]["h"]
outside1.startpoint = [b * 8, b * 4]
outside1.exitareas = [Exit("right", False, 'outside2', "left", "same"),
                      Exit("left", False, 'jeremyhome', "right",
                           "same"),
                      Exit([housewidth * (1.5 / 5) + houserock.x, househeight * (3 / 5), housewidth * (1 / 10),
                            househeight * (1 / 5)],
                           True, 'honeyhome',
                           41, insideheight - honeyh)]

outside1.lvrange = [1, 2]
outside1c = getconversation("meaniestops")
outside1c.area = [treerock.x, 0, outsidewidth, outsideheight]
outside1c.isbutton = False
outside1c.eventrequirements = [EventRequirement("beat meanie", -1, 1)]

outside1c.special_battle = copy.copy(enemies.enemies["mean green"])
# lv of 0 triggers tutorial
outside1c.special_battle.lv = 0
outside1c.special_battle.storyeventsonwin = ["beat meanie"]
outside1c.special_battle.storyeventsonflee = ["beat meanie", "flee from meanie"]

goodc = getconversation("prettygood")
goodc.area = [0,0,outsidewidth,outsideheight]
goodc.storyevent = "goodc"
goodc.eventrequirements = [EventRequirement("beat meanie"), EventRequirement("goodc", -1, 1),
开发者ID:oflatt,项目名称:pythonRpgProject,代码行数:32,代码来源:honeyhomemaps.py

示例3: Map

# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import lvrange [as 别名]
from conversations import getconversation
from Map import Map
from graphics import snowland
from Exit import Exit
from Rock import Rock
from pygame import Rect


# snowentrance###########################################################################
snowentrance = Map(snowland(650, 500, True), [])
snowentrance.populate_with("snowpinetree", randint(4, 10))

snowentrance.exitareas = [Exit("right", False, "jeremyhome", "left", "same"),
                          Exit("left", False, "snowarea1", "right", "same")]
snowentrance.enemies = enemies.snowenemies
snowentrance.lvrange = [6]

# snowarea1##############################################################################
snowarea1 = Map(snowland(700, 500), [])
snowarea1.populate_with("snowpinetree", randint(10, 15))

snowarea1.lvrange = [6, 7]
snowarea1.enemies = enemies.snowenemies

snowarea1.exitareas = [Exit("right", False, "snowentrance", "left", "same"),
                       Exit("left", False, "hoppingtreearea", "right", "same")]

# hoppingtreearea#######################################################################
hoppingrock = Rock("chicking0", 350, 250, variables.TREECOLLIDESECTION)
hoppingtreearea = Map(snowland(800, 500), [hoppingrock])
开发者ID:oflatt,项目名称:pythonRpgProject,代码行数:32,代码来源:snowmaps.py


注:本文中的Map.Map.lvrange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。