exo birdie et titi de Greg
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 742 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():
  6. print('Clic souris !')
  7. titi.y -= 50
  8. def update():
  9. titi.y += titi.speed
  10. tube_superieur.x -= vitesse_defilement
  11. tube_inferieur.x -= vitesse_defilement
  12. if tube_superieur.right < 0 :
  13. tube_superieur.left = WIDTH
  14. tube_inferieur.left = WIDTH
  15. def draw():
  16. screen.blit('background', (0, 0))
  17. titi.draw()
  18. tube_superieur.draw()
  19. tube_inferieur.draw()
  20. titi = Actor('bird1', (75, 350))
  21. titi.speed = 1
  22. ecart = 140
  23. tube_superieur = Actor('top', (300, 0))
  24. tube_inferieur = Actor('bottom', (300, tube_superieur.height + ecart))
  25. vitesse_defilement = 1
  26. # print(tube_superieur.width, tube_superieur.height)
  27. pgzrun.go()