From c8dd210afa01a849751d4ede27ca4add5a9bf6f7 Mon Sep 17 00:00:00 2001 From: ophelie Date: Tue, 1 Dec 2020 13:44:45 +0100 Subject: [PATCH] chapitre_1_challenge3_ok --- birdie.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/birdie.py b/birdie.py index b61606b..58a55c2 100644 --- a/birdie.py +++ b/birdie.py @@ -7,8 +7,15 @@ HEIGHT = 708 #hauteur def on_mouse_down(): # fonction 'click avec souris' print('Clique souris !') # sortie en terminal pour verifier si c'est ok if on_mouse_down : + titi.y =0 titi.speed = 0 +def on_mouse_up(): # fonction 'quand la souris ne click plus' + print('relache souris') + if on_mouse_up : + titi.y += 100 + titi.speed = 5 + def update(): titi.y += titi.speed # mise a jour (60x/sec) de titi