From 3efe2486940ab10713c4566810747ee26152c278 Mon Sep 17 00:00:00 2001 From: gaetanv Date: Tue, 24 Nov 2020 15:39:20 +0100 Subject: [PATCH] =?UTF-8?q?3=C2=B0=20maj?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bird.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bird.py b/bird.py index 4d86136..a031c46 100644 --- a/bird.py +++ b/bird.py @@ -15,8 +15,7 @@ def draw(): tutu.draw() top.draw() bottom.draw() - - + def on_mouse_down(pos): print( pos, 'est la position lors du clic gauche') titi.speed = 0 @@ -24,12 +23,18 @@ def on_mouse_down(pos): def on_mouse_up (pos): print( pos) - titi.speed = 2 - tutu.speed = 2 - + titi.speed = 10 + tutu.speed = 10 + def update(): - titi.x += titi.speed - tutu.y += tutu.speed + titi.x += titi.speed + tutu.y += tutu.speed + if titi.x > 400 : + titi.x = 0 + if tutu.y > 700 : + tutu.y = 10 + + titi.speed = 1 tutu.speed = 1