From 1761503bd558016b7249bee615a7e4edae73af0c Mon Sep 17 00:00:00 2001 From: Melo Date: Tue, 1 Dec 2020 13:52:36 +0100 Subject: [PATCH] Challenge --- birdie.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/birdie.py b/birdie.py index a10576d..fce6720 100644 --- a/birdie.py +++ b/birdie.py @@ -5,21 +5,32 @@ WIDTH = 400 HEIGHT = 708 titi = Actor('bird1', (75, 350)) +ghost = Actor('birddead',(75,350)) def draw(): screen.blit('background', (0, 0)) titi.draw() + ghost.draw() def on_mouse_down(): - print('Clic souris !') - #titi.y -= 20 - #titi.x -= -10 + print('stop !') + titi.y -= 20 + ghost.x -= 10 titi.speed = 0 + ghost.speed = 0 + +def on_mouse_up(): + print('go') + titi.speed = 5 + ghost.speed = 4 + def update(): titi.x += titi.speed + ghost.y += ghost.speed -titi.speed = 1 +titi.speed = 5 +ghost.speed = 4 pgzrun.go()