|
@@ -0,0 +1,24 @@ |
|
|
|
|
|
import pgzrun |
|
|
|
|
|
|
|
|
|
|
|
# Le corps du programme devrait se trouver ici... |
|
|
|
|
|
TITLE = "Paf l'oiseau" |
|
|
|
|
|
WIDTH = 400 |
|
|
|
|
|
HEIGHT = 700 |
|
|
|
|
|
|
|
|
|
|
|
titi = Actor('bird1', (75, 350)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def draw(): |
|
|
|
|
|
screen.blit('background', (0, 0)) |
|
|
|
|
|
titi.draw() |
|
|
|
|
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
|
|
|
titi.x = 0 |
|
|
|
|
|
|
|
|
|
|
|
def update(): |
|
|
|
|
|
titi.x += titi.speed |
|
|
|
|
|
|
|
|
|
|
|
titi.speed = 1 |
|
|
|
|
|
|
|
|
|
|
|
pgzrun.go() |