本文整理汇总了Python中World.World.players方法的典型用法代码示例。如果您正苦于以下问题:Python World.players方法的具体用法?Python World.players怎么用?Python World.players使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World.World
的用法示例。
在下文中一共展示了World.players方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WorldSprite
# 需要导入模块: from World import World [as 别名]
# 或者: from World.World import players [as 别名]
wall = WorldSprite(64, 450, 300, 32)
wall.image = pygame.Surface((wall.rect.width, wall.rect.height))
wall.image.fill((0,255,0))
leftWall = WorldSprite(0, 32, 32, world.size[1]-64)
leftWall.image = pygame.Surface((leftWall.rect.width, leftWall.rect.height))
leftWall.image.fill((0,255,0))
rightWall = WorldSprite(world.size[0]-32, 32, 32, world.size[1]-64)
rightWall.image = pygame.Surface((rightWall.rect.width, rightWall.rect.height))
rightWall.image.fill((0,255,0))
world.background = [floor, leftWall, rightWall, roof, wall]
world.clip = [floor, leftWall, rightWall, roof, wall]
world.players = [player]
world.crates = [crate]
world.gravity = 2
world.mobSpawns = [[100, 100]]
for i in world.drawList:
for e in i:
print i.size, i.position
enemySpawn = 0
while 1:
world.buildDrawList()
world.buildEntList()
screen.fill((255,255,255))
world.draw(screen)