ソースを参照

Mise à jour

chapitre-1-challenge-1
Cleason 3年前
コミット
26b87f8182
1個のファイルの変更13行の追加2行の削除
  1. +13
    -2
      birdie.py

+ 13
- 2
birdie.py ファイルの表示

@@ -18,12 +18,23 @@ def draw():
def on_mouse_up():
print('Clic souris !')
titi.y -= 50 # équivalent à titi.y = titi.y - 50
bird.x -= 60 # équivalent à bird.x = bird.x - 60
bird.x -= 50 # équivalent à bird.x = bird.x - 60

def on_mouse_down():
print('Stop')
titi.speed = 0 # équivalent à titi.y = titi.y 0
bird.speed = 0 # équivalent à bird.x = bird.x 0

def update():
titi.x += titi.speed
titi.y += titi.speed
bird.x += bird.speed

if titi.y > 400 :
titi.y = 0

if bird.x > 400 :
bird.x = 0

titi.speed = 1
bird.speed = 1



読み込み中…
キャンセル
保存