Un petit jeu réalisé avec pgzero
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

46 satır
724 B

  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. titi = Actor('bird1', (151, 350))
  6. titi2 = Actor('birddead', (11, 250))
  7. def draw():
  8. screen.blit('background', (0, 0))
  9. screen.blit('bottom', (0, 0))
  10. titi.draw()
  11. titi2.draw()
  12. def on_mouse_down():
  13. print('Clic souris !')
  14. titi.y -= 15
  15. titi2.y += 15
  16. def on_mouse_up():
  17. titi.speed += 1
  18. titi2.speed += 4
  19. def update():
  20. print(titi.speed, titi2.speed )
  21. if titi.x>400:
  22. titi.x = 0
  23. titi.x += titi.speed
  24. else:
  25. titi.x += titi.speed
  26. if titi2.x>400:
  27. titi2.x = 0
  28. titi2.x += titi2.speed
  29. else:
  30. titi2.x += titi.speed
  31. titi.speed = 1
  32. titi2.speed = 6
  33. pgzrun.go()