|
|
@@ -5,18 +5,16 @@ HEIGHT = 708 |
|
|
|
|
|
|
|
def on_mouse_down(): |
|
|
|
print('Clic enfoncé souris !') |
|
|
|
titi.backupspeed = titi.speed |
|
|
|
titi2.backupspeed = titi2.speed |
|
|
|
titi.speed = 0 |
|
|
|
titi2.speed = 0 |
|
|
|
titi.x -= 50 |
|
|
|
titi2.y -= 50 |
|
|
|
def on_mouse_up(): |
|
|
|
print('Clic souris !') |
|
|
|
titi.speed = 2 |
|
|
|
titi2.speed = 2 |
|
|
|
|
|
|
|
def update(): |
|
|
|
titi.x += titi.speed |
|
|
|
titi2.y += titi2.speed |
|
|
|
titi.speed = titi.backupspeed+2 |
|
|
|
titi2.speed = titi2.backupspeed+2 |
|
|
|
|
|
|
|
def draw(): |
|
|
|
|
|
|
@@ -26,6 +24,16 @@ def draw(): |
|
|
|
titi = Actor('bird1', (75, 350)) |
|
|
|
titi2 = Actor('bird2', (75, 350)) |
|
|
|
|
|
|
|
def update(): |
|
|
|
titi.x += titi.speed |
|
|
|
titi2.y += titi2.speed |
|
|
|
if titi.x > 400 : |
|
|
|
titi.x = 0 |
|
|
|
if titi2.y > 708 : |
|
|
|
titi2.y = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
titi.speed = 1 |
|
|
|
titi2.speed = 1 |
|
|
|
|
|
|
|