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.

birdie.py 691 B

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
12345678910111213141516171819202122232425262728293031323334353637
  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. direction = 1
  6. def on_mouse_down(button):
  7. if button == mouse.LEFT:
  8. print('freinage')
  9. titi.speed -= 1
  10. elif button == mouse.RIGHT:
  11. print('accélaration')
  12. titi.speed += 1
  13. def on_mouse_up():
  14. titi.speed = 1
  15. blackbird.speed = 1
  16. def update():
  17. if titi.left > WIDTH:
  18. titi.right = 0
  19. if titi.right < 0:
  20. titi.left = WIDTH
  21. titi.x += titi.speed
  22. def draw():
  23. screen.blit('background', (0, 0))
  24. titi.draw()
  25. blackbird.draw()
  26. titi = Actor('bird1', (75, 350))
  27. blackbird = Actor('bird2', (95, 150))
  28. titi.speed = 1
  29. blackbird.speed = 2
  30. pgzrun.go()