From c45db8638b681cd7a80d2910552015e7828bf4b5 Mon Sep 17 00:00:00 2001 From: Jordan-Pleugers Date: Tue, 24 Nov 2020 15:02:08 +0100 Subject: [PATCH] =?UTF-8?q?mise=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- birdie.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/birdie.py b/birdie.py index a2d6bab..3f559a8 100644 --- a/birdie.py +++ b/birdie.py @@ -1 +1,21 @@ -print('Hello world !') +import pgzrun +TITLE = "Paf l'oiseau" +WIDTH = 400 +HEIGHT = 708 + +def on_mouse_down(): + print('Clic souris !') + titi.y -= 50 # équivalent à titi.y = titi.y - 50 + +def update(): + titi.y += titi.speed + +def draw(): + + screen.blit('background', (0, 0)) + titi.draw() +titi = Actor('bird1', (75, 350)) + +titi.speed = 1 + +pgzrun.go()