本文整理汇总了Python中Map.Map.exitareas方法的典型用法代码示例。如果您正苦于以下问题:Python Map.exitareas方法的具体用法?Python Map.exitareas怎么用?Python Map.exitareas使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map.Map
的用法示例。
在下文中一共展示了Map.exitareas方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Animation
# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import exitareas [as 别名]
jmyman.background_range = hole.background_range.copy()
dancelionanim = Animation(["dancelion0", "dancelion1"], (60000/130)*2)
dancelion = Rock(dancelionanim, b/2, b * 4, [0, 3 / 4, 1, 1 / 4])
dancelion.updatealways = True
jeremyhome = Map(rgrassland, [hole,
jmyman,
dancelion])
dontputrockslist = [dancelion.getrect(), jmyman.getrect()]
jeremyhome.populate_with("greyrock", randint(0, 2), dontputrockslist)
jeremyhome.populate_with("pinetree", randint(3, 8), dontputrockslist)
jeremyhome.populate_with("flower", randint(15, 25), dontputrockslist)
jeremyhome.exitareas = [Exit("right", False, 'outside1', "left", "same"),
Exit("left", False, 'snowentrance', "right", "same")]
jeremy = getconversation("jeremy")
jeremy.area = [b * 5 + GR["rabbithole"]["w"] - (honeyw / 2), b * 5 - GR["rabbithole"]["h"],
GR["rabbithole"]["w"] - (honeyw / 2), GR["rabbithole"]["h"]]
jeremy.eventrequirements = [EventRequirement("beatsteve", -1, 1)]
jeremyaftersteve = getconversation("jeremyaftersteve")
jeremyaftersteve.area = jeremy.area.copy()
jeremyaftersteve.eventrequirements = [EventRequirement("beatsteve")]
dancelionpass = getconversation("dancelionpass")
dancelionpass.area = [0, 0, b, b * 10]
dancelionpass.isbutton = False
dancelionpass.exitteleport = [b + honeyw / 4, "same"]
dancelionpass.eventrequirements = [EventRequirement("beatsteve", -1, 1)]
示例2: getconversation
# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import exitareas [as 别名]
doorexit.eventrequirements = [EventRequirement("letter")]
blockexit = getconversation("hungry")
blockexit.area = doorexit.area
blockexit.eventrequirements = [EventRequirement("letter", -1, 1)]
honeyhome.conversations = [eatfromstash, blockexit]
honeyhome.startpoint = [28, 39]
letterexit = Exit([67, 100, 20, 30],
True, 'letter',
GR["paper"]['w']*(3/10), 0)
letterexit.storyevent = "letter"
honeyhome.exitareas = [doorexit,
letterexit]
honeyhome.colliderects = [Rect(0, 0, 30, 74), # bed
Rect(0, 0, insidewidth, 48), # wall
Rect(44, 0, 26, 60), # wardrobe
Rect(75, 110 + 11, 44, 13)] # table
honeyhome.uselastposq = True
# letter########################################################################################
paperscale = int((GR["honeyhouseinside"]["h"]/GR["paper"]["h"])+1) # so it is as big as inside to put the text in it
GR["backgroundforpaper"]["img"] = pygame.transform.scale(GR["backgroundforpaper"]["img"],
[GR["backgroundforpaper"]["w"]*paperscale,
GR["backgroundforpaper"]["h"]*paperscale])
GR["backgroundforpaper"]["w"] *= paperscale
示例3: Map
# 需要导入模块: from Map import Map [as 别名]
# 或者: from Map.Map import exitareas [as 别名]
import variables, graphics, enemies
from enemies import enemyforspecialbattle
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)