Browse Source

Solution retravailée au cours

chapitre-1-challenge-1
parent
commit
1e849cd3fb
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      birdie.py

+ 4
- 2
birdie.py View File

@@ -6,15 +6,17 @@ HEIGHT = 708


def on_mouse_down(): def on_mouse_down():
print('Clic souris !') print('Clic souris !')
titi.x -= 50 # équivalent à titi.y = titi.y - 50
titi.y += 50


def update(): def update():
titi.x += 1
titi.x += titi.vitesse


def draw(): def draw():
screen.blit('background', (0, 0)) screen.blit('background', (0, 0))
titi.draw() titi.draw()


titi = Actor('bird1', (75, 350)) titi = Actor('bird1', (75, 350))
titi.vitesse = 1


pgzrun.go() pgzrun.go()

Loading…
Cancel
Save