|
- import pgzrun
-
- TITLE = "Paf l'oiseau"
- WIDTH = 400
- HEIGHT = 708
-
- def on_mouse_down():
- print('Stop!')
- titi.speed = 1
-
- def on_mouse_up():
- titi.speed = 1
- blackbird.speed = 1
-
- def update():
- titi.x += titi.speed
- blackbird.x += blackbird.speed
-
- def draw():
- screen.blit('background', (0, 0))
- titi.draw()
- blackbird.draw()
-
- titi = Actor('bird1', (75, 350))
- blackbird = Actor('bird2', (95, 150))
- titi.speed = 1
- blackbird.speed = 2
-
- pgzrun.go()
|