|
@@ -5,16 +5,17 @@ WIDTH = 400 |
|
|
HEIGHT = 708 |
|
|
HEIGHT = 708 |
|
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
def on_mouse_down(): |
|
|
print('Clic souris !') |
|
|
|
|
|
titi.x -= 50 # équivalent à titi.y = titi.y - 50 |
|
|
|
|
|
|
|
|
print('Stop!') |
|
|
|
|
|
titi.speed = 0 |
|
|
|
|
|
|
|
|
def update(): |
|
|
def update(): |
|
|
titi.x += titi.speed |
|
|
titi.x += titi.speed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.speed = 1 |
|
|
titi.speed = 1 |
|
|
|
|
|
|
|
|
pgzrun.go() |
|
|
pgzrun.go() |