|
- import pgzrun
-
- TITLE = "Paf l'oiseau"
- WIDTH = 400
- HEIGHT = 708
-
- haut = 75
- larg = 350
- titi = Actor('bird1', (haut, larg))
-
- def draw():
- screen.blit('background', (0, 0))
- titi.draw()
-
- def on_mouse_down():
- print('Clic souris !')
- # titi.y -= 20
- # titi.x -= -10
- titi.speed = 0
- def on_mouse_up():
- titi.speed = 10
-
-
- def update():
- titi.x += titi.speed
-
-
- titi.speed = 1
-
-
- pgzrun.go()
|