Browse Source

avancement

chapitre-2-Melo
Melo 3 years ago
parent
commit
4024cade8c
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      birdie.py

+ 8
- 1
birdie.py View File

@@ -9,13 +9,20 @@ def on_mouse_down():
titi.y -= 50 titi.y -= 50


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


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


titi = Actor('bird1', (75, 350)) titi = Actor('bird1', (75, 350))


titi.speed = 1 titi.speed = 1
ecart = 140
tube_sup = Actor ('top',(300,0))
tube_inf = Actor ('bottom',(300,tube_sup.height + ecart))


pgzrun.go() pgzrun.go()

Loading…
Cancel
Save