Jeux flappy bird en python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
322 B

  1. import pgzrun
  2. TITLE = "vava bird"
  3. WIDTH = 490
  4. HEIGHT = 490
  5. d = 2
  6. def update():
  7. global d
  8. if oiseau.x >= 470 and d > 0:
  9. d = -d
  10. if oiseau.x <= 20 and d < 0:
  11. d = -d
  12. oiseau.x += d
  13. def draw():
  14. screen.blit("back", (0, 0))
  15. oiseau.draw()
  16. oiseau = Actor("bird1", (20, 15))
  17. pgzrun.go()