Explorar el Código

mise à jour challenge 1

chapitre-1-challenge-1
Jordan Pleugers hace 3 años
padre
commit
67bd672a28
Se han modificado 1 ficheros con 14 adiciones y 6 borrados
  1. +14
    -6
      birdie.py

+ 14
- 6
birdie.py Ver fichero

@@ -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



Cargando…
Cancelar
Guardar