|
@@ -10,11 +10,13 @@ ghost = Actor('birddead',(75,350)) |
|
|
def draw(): |
|
|
def draw(): |
|
|
screen.blit('background', (0, 0)) |
|
|
screen.blit('background', (0, 0)) |
|
|
titi.draw() |
|
|
titi.draw() |
|
|
ghost.draw() |
|
|
|
|
|
|
|
|
#ghost.draw() |
|
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
def on_mouse_down(): |
|
|
print('stop !') |
|
|
|
|
|
titi.y -= 20 |
|
|
|
|
|
|
|
|
print("plus vite)") |
|
|
|
|
|
# titi.speed +=1 |
|
|
|
|
|
# print('stop !') |
|
|
|
|
|
# titi.y -= 20 |
|
|
ghost.x -= 10 |
|
|
ghost.x -= 10 |
|
|
titi.speed = 0 |
|
|
titi.speed = 0 |
|
|
ghost.speed = 0 |
|
|
ghost.speed = 0 |
|
@@ -27,10 +29,10 @@ def on_mouse_up(): |
|
|
|
|
|
|
|
|
def update(): |
|
|
def update(): |
|
|
titi.x += titi.speed |
|
|
titi.x += titi.speed |
|
|
ghost.y += ghost.speed |
|
|
|
|
|
|
|
|
#ghost.y += ghost.speed |
|
|
|
|
|
|
|
|
titi.speed = 5 |
|
|
titi.speed = 5 |
|
|
ghost.speed = 4 |
|
|
|
|
|
|
|
|
#ghost.speed = 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pgzrun.go() |
|
|
pgzrun.go() |