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