From 2e0e262e119a1a9b808049e33ab646a1b9e99302 Mon Sep 17 00:00:00 2001 From: Jen Date: Tue, 8 Dec 2020 15:16:52 +0100 Subject: [PATCH] chap1-challenge4 --- birdie.py | 21 +++++++++++++++++++-- paf-loiseau | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) create mode 160000 paf-loiseau diff --git a/birdie.py b/birdie.py index 58a55c2..53ed59f 100644 --- a/birdie.py +++ b/birdie.py @@ -9,20 +9,37 @@ def on_mouse_down(): # fonction 'click avec souris' if on_mouse_down : titi.y =0 titi.speed = 0 - + piou.y =0 + piou.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 + piou.speed = 3 def update(): titi.y += titi.speed # mise a jour (60x/sec) de titi + piou.y += piou.speed def draw(): screen.blit('background', (0, 0)) # import arrière plan titi.draw() # 'dessiner' titi + piou.draw() + titi = Actor('bird1', (75, 350)) # définir position de titi +piou = Actor('bird2', (65,300)) titi.speed = 5 # définir vitesses de chute de titi -pgzrun.go() # syntaxe 'conventionnelle' de pgzero \ No newline at end of file +piou.speed = 3 + + + + + + +pgzrun.go() # syntaxe 'conventionnelle' de pgzero + + + diff --git a/paf-loiseau b/paf-loiseau new file mode 160000 index 0000000..73a5928 --- /dev/null +++ b/paf-loiseau @@ -0,0 +1 @@ +Subproject commit 73a5928bb30eac022e4e75d97302aa4aa8953dbd