|
@@ -4,12 +4,19 @@ TITLE = "Paf l'oiseau" |
|
|
WIDTH = 400 |
|
|
WIDTH = 400 |
|
|
HEIGHT = 708 |
|
|
HEIGHT = 708 |
|
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
|
|
|
print('Clic souris !') |
|
|
|
|
|
titi.y -= 50 |
|
|
|
|
|
|
|
|
def on_mouse_down(button): |
|
|
|
|
|
print('Clic', button) |
|
|
|
|
|
if button == mouse.RIGHT : |
|
|
|
|
|
titi.speed += 1 |
|
|
|
|
|
elif button == mouse.LEFT : |
|
|
|
|
|
titi.speed -= 1 |
|
|
|
|
|
|
|
|
def update(): |
|
|
def update(): |
|
|
titi.y += titi.speed |
|
|
|
|
|
|
|
|
titi.x += titi.speed |
|
|
|
|
|
if titi.left > WIDTH : |
|
|
|
|
|
titi.right = 0 |
|
|
|
|
|
if titi.right < 0 : |
|
|
|
|
|
titi.left = WIDTH |
|
|
|
|
|
|
|
|
def draw(): |
|
|
def draw(): |
|
|
screen.blit('background', (0, 0)) |
|
|
screen.blit('background', (0, 0)) |
|
|