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 574 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
1234567891011121314151617181920212223242526272829303132333435363738
  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()