Parcourir la source

mise à jour challenge 1

chapitre-1-challenge-1
Jordan Pleugers il y a 3 ans
Parent
révision
67bd672a28
1 fichiers modifiés avec 14 ajouts et 6 suppressions
  1. +14
    -6
      birdie.py

+ 14
- 6
birdie.py Voir le fichier

@@ -5,18 +5,16 @@ HEIGHT = 708

def on_mouse_down():
print('Clic enfoncé souris !')
titi.backupspeed = titi.speed
titi2.backupspeed = titi2.speed
titi.speed = 0
titi2.speed = 0
titi.x -= 50
titi2.y -= 50
def on_mouse_up():
print('Clic souris !')
titi.speed = 2
titi2.speed = 2

def update():
titi.x += titi.speed
titi2.y += titi2.speed
titi.speed = titi.backupspeed+2
titi2.speed = titi2.backupspeed+2

def draw():
@@ -26,6 +24,16 @@ def draw():
titi = Actor('bird1', (75, 350))
titi2 = Actor('bird2', (75, 350))

def update():
titi.x += titi.speed
titi2.y += titi2.speed
if titi.x > 400 :
titi.x = 0
if titi2.y > 708 :
titi2.y = 0



titi.speed = 1
titi2.speed = 1



Chargement…
Annuler
Enregistrer