Un petit jeu réalisé avec pgzero
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

birdie.py 1.1 KiB

il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import pgzrun
  2. <<<<<<< HEAD
  3. =======
  4. >>>>>>> 305580eea7190f860f95c5a693da9fcb58fadf6a
  5. TITLE = "Paf l'oiseau"
  6. WIDTH = 400
  7. HEIGHT = 708
  8. def on_mouse_down():
  9. <<<<<<< HEAD
  10. print('Clic enfoncé souris !')
  11. birdie.backupspeed = birdie.speed
  12. birdie2.backupspeed = birdie.speed
  13. birdie.speed = 0
  14. birdie2.speed = 0
  15. birdie.x -= 50
  16. birdie2.y -= 50
  17. def on_mouse_up():
  18. print('Clic souris !')
  19. birdie.speed = birdie.backupspeed+2
  20. birdie2.speed = birdie2.backupspeed+2
  21. def draw():
  22. screen.blit('cascade', (0, 0))
  23. birdie.draw()
  24. birdie2.draw()
  25. birdie = Actor('bird1', (75, 350))
  26. birdie2 = Actor('bird2', (75, 350))
  27. def update():
  28. birdie.x += birdie.speed
  29. birdie2.y += birdie2.speed
  30. if birdie.x > 400 :
  31. birdie.x = 0
  32. if birdie2.y > 708 :
  33. birdie2.y = 0
  34. birdie.speed = 1
  35. birdie2.speed = 1
  36. pgzrun.go()
  37. =======
  38. print('Clic souris !')
  39. titi.y -= 50
  40. def update():
  41. titi.y += titi.speed
  42. def draw():
  43. screen.blit('background', (0, 0))
  44. titi.draw()
  45. titi = Actor('bird1', (75, 350))
  46. titi.speed = 1
  47. pgzrun.go()
  48. >>>>>>> 305580eea7190f860f95c5a693da9fcb58fadf6a