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.

35 rivejä
641 B

  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. def on_mouse_down():
  6. print('Clic souris !')
  7. titi.y -= 50
  8. def update():
  9. titi.y += titi.speed
  10. tube_inf.x -= vitesse_defilement
  11. tube_supp.x -= vitesse_defilement
  12. if tube_supp.right < 0 :
  13. tube_supp.left= WIDTH
  14. def draw():
  15. screen.blit('background', (0, 0))
  16. titi.draw()
  17. tube_supp.draw()
  18. tube_inf.draw()
  19. titi = Actor('bird1', (75, 350))
  20. titi.speed = 1
  21. ecart = 140
  22. tube_supp = Actor("top",(300,0))
  23. tube_inf = Actor("bottom",(300,tube_supp.height + ecart))
  24. print(tube_supp.width,tube_supp.height)
  25. vitesse_defilement = 1
  26. pgzrun.go()