exo birdie et titi de Greg
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

birdie.py 742 B

hace 3 años
hace 3 años
hace 3 años
hace 3 años
hace 3 años
hace 3 años
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()