From b9e18b4134a087561b52c76863f283049bf73896 Mon Sep 17 00:00:00 2001 From: ophelie Date: Tue, 24 Nov 2020 16:29:10 +0100 Subject: [PATCH] chap1 challenge2 ok --- birdie.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/birdie.py b/birdie.py index ce3af99..b61606b 100644 --- a/birdie.py +++ b/birdie.py @@ -1,15 +1,16 @@ import pgzrun # création fenêtre TITLE = "Paf l'oiseau" # définition titre -WIDTH = 708 # largeur -HEIGHT = 400 #hauteur +WIDTH = 400 # largeur +HEIGHT = 708 #hauteur -def on_mouse_down(): # fonction 'si click avec souris' +def on_mouse_down(): # fonction 'click avec souris' print('Clique souris !') # sortie en terminal pour verifier si c'est ok - titi.x -= 100 + if on_mouse_down : + titi.speed = 0 def update(): - titi.x += titi.speed # mise a jour (60x/sec) de titi + titi.y += titi.speed # mise a jour (60x/sec) de titi def draw(): screen.blit('background', (0, 0)) # import arrière plan