Un petit jeu réalisé avec pgzero
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
340 B

  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 # équivalent à titi.y = titi.y - 50
  8. def update():
  9. titi.y += titi.speed
  10. def draw():
  11. screen.blit('background', (0, 0))
  12. titi.draw()
  13. titi = Actor('bird1', (75, 350))
  14. titi.speed = 1
  15. pgzrun.go()