Un petit jeu réalisé avec pgzero
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.

29 line
476 B

  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. def on_mouse_down():
  6. print('Stop!')
  7. titi.speed = 1
  8. def on_mouse_up():
  9. titi.speed = 1
  10. blackbird.speed = 1
  11. def update():
  12. titi.x += titi.speed
  13. blackbird.x += blackbird.speed
  14. def draw():
  15. screen.blit('background', (0, 0))
  16. titi.draw()
  17. blackbird.draw()
  18. titi = Actor('bird1', (75, 350))
  19. blackbird = Actor('bird2', (95, 150))
  20. titi.speed = 1
  21. blackbird.speed = 2
  22. pgzrun.go()