# 创建小鸟方块存储小鸟位置信息
bird_rect = bird_surface.get_rect(center=(100, 240))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_SPACE:
bird_movement =0
bird_movement -= 12
screen.blit(bg_surface, (0, 0))
bird_movement += gravity
bird_rect.centery += bird_movement
screen.blit(bird_surface, bird_rect)
floor_x_pos -= 1
draw_floor()
if floor_x_pos <= -288:
floor_x_pos = 0
pygame.display.update()
clock.tick(30)
2020-12-01
最新推荐文章于 2022-02-14 14:11:01 发布
8092

被折叠的 条评论
为什么被折叠?



