Un petit jeu réalisé avec pgzero
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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_inf.x -= vitesse_defilement
  11. tube_supp.x -= vitesse_defilement
  12. if tube_supp.right < 0 :
  13. tube_supp.left= WIDTH
  14. def draw():
  15. screen.blit('background', (0, 0))
  16. titi.draw()
  17. tube_supp.draw()
  18. tube_inf.draw()
  19. titi = Actor('bird1', (75, 350))
  20. titi.speed = 1
  21. ecart = 140
  22. tube_supp = Actor("top",(300,0))
  23. tube_inf = Actor("bottom",(300,tube_supp.height + ecart))
  24. print(tube_supp.width,tube_supp.height)
  25. vitesse_defilement = 1
  26. pgzrun.go()