Un petit jeu réalisé avec pgzero
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

39 wiersze
574 B

  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. titi = Actor('bird1', (75, 350))
  6. ghost = Actor('birddead',(75,350))
  7. def draw():
  8. screen.blit('background', (0, 0))
  9. titi.draw()
  10. #ghost.draw()
  11. def on_mouse_down():
  12. print("plus vite)")
  13. # titi.speed +=1
  14. # print('stop !')
  15. # titi.y -= 20
  16. ghost.x -= 10
  17. titi.speed = 0
  18. ghost.speed = 0
  19. def on_mouse_up():
  20. print('go')
  21. titi.speed = 5
  22. ghost.speed = 4
  23. def update():
  24. titi.x += titi.speed
  25. #ghost.y += ghost.speed
  26. titi.speed = 5
  27. #ghost.speed = 4
  28. pgzrun.go()