本文整理汇总了Python中Player.show方法的典型用法代码示例。如果您正苦于以下问题:Python Player.show方法的具体用法?Python Player.show怎么用?Python Player.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Player
的用法示例。
在下文中一共展示了Player.show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: show
# 需要导入模块: import Player [as 别名]
# 或者: from Player import show [as 别名]
def show(game):
win = getWin(game)
bg = getBackground(game)
level = getLevel(game)
player = getPlayer(game)
win.erase()
Background.show(bg, win)
showCursor(player, win)
for n in range(0, len(level['horde'])):
Animat.show(level['horde'][n], win)
Player.show(player, win)
Tower.show(player, win)
示例2: Player
# 需要导入模块: import Player [as 别名]
# 或者: from Player import show [as 别名]
ypos = 300
player = Player()
img = pygame.image.load('Player.png')
GameRunning = True
pygame.display.set_caption("MAE Game Testing")
# GAME LOOP
while True:
# PROCESSES
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
mov_x_change, mov_y_change = player.move(event)
xpos += mov_x_change
ypos += mov_y_change
if GameRunning:
total_frames += 1
pygame.display.flip()
screen.fill(black)
player.show(img, xpos, ypos)
clock.tick(FPS)