From a5b65ae34329c9a20f159d465a632f05d8a6a3cb Mon Sep 17 00:00:00 2001 From: Cleason Date: Tue, 24 Nov 2020 14:46:43 +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 | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/birdie.py b/birdie.py index a2d6bab..a3ab3d3 100644 --- a/birdie.py +++ b/birdie.py @@ -1 +1,26 @@ -print('Hello world !') +import pgzrun + +TITLE = "Paf l'oiseau" +WIDTH = 400 +HEIGHT = 708 + +def draw(): + screen.blit('cascade', (0, 0)) + +titi = Actor('bird1', (75, 350)) + +def draw(): + screen.blit('background', (0, 0)) + titi.draw() + +def on_mouse_down(): + print('Clic souris !') + titi.y -= 50 # équivalent à titi.y = titi.y - 50 + +def update(): + titi.y += titi.speed + +titi.speed = 1 + + +pgzrun.go() \ No newline at end of file