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 529 B

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
12345678910111213141516171819202122232425262728293031323334
  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. def on_mouse_down(button):
  6. if button == mouse.LEFT:
  7. print("freinage")
  8. titi.speed -=1
  9. elif button == mouse.RIGHT:
  10. print ("Accélération")
  11. titi.speed += 1
  12. def update():
  13. if titi.left > WIDTH:
  14. titi.right = 0
  15. if titi.right <0:
  16. titi.left = WIDTH
  17. titi.y += titi.speed
  18. def draw():
  19. screen.blit('background', (0, 0))
  20. titi.draw()
  21. titi = Actor ('bird1', (100,10))
  22. titi.speed = 1
  23. pgzrun.go()