From 442b306cde7a28615e45b948fd4fc4df2dfb973b Mon Sep 17 00:00:00 2001 From: Eica2020! Date: Tue, 1 Dec 2020 14:17:50 +0100 Subject: [PATCH] Changements --- birdie.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/birdie.py b/birdie.py index a2d6bab..d325830 100644 --- a/birdie.py +++ b/birdie.py @@ -1 +1,30 @@ -print('Hello world !') +import pgzrun + +TITLE = "Paf l'oiseau" +WIDTH = 400 +HEIGHT = 500 + +def on_mouse_down():#Arrête l'itération quand on clic sur la souris + print('clic souris !') + #titi.x == StopIteration + #titi.y == StopIteration + titi.x += 30 # équivalent à titi.y = titi.y - 50 + titi.y -= 30 + +def on_mouse_up():#Avance quand on lache la souris + print("Don't clic souris ! " ) + +def draw(): + screen.blit('cascade', (0, 0)) + titi.draw() + +titi = Actor('bird1', (0, 0)) + +def update(): + titi.y += titi.speed +titi.speed = 1 + + + + +pgzrun.go()