|
@@ -7,8 +7,15 @@ HEIGHT = 708 #hauteur |
|
|
def on_mouse_down(): # fonction 'click avec souris' |
|
|
def on_mouse_down(): # fonction 'click avec souris' |
|
|
print('Clique souris !') # sortie en terminal pour verifier si c'est ok |
|
|
print('Clique souris !') # sortie en terminal pour verifier si c'est ok |
|
|
if on_mouse_down : |
|
|
if on_mouse_down : |
|
|
|
|
|
titi.y =0 |
|
|
titi.speed = 0 |
|
|
titi.speed = 0 |
|
|
|
|
|
|
|
|
|
|
|
def on_mouse_up(): # fonction 'quand la souris ne click plus' |
|
|
|
|
|
print('relache souris') |
|
|
|
|
|
if on_mouse_up : |
|
|
|
|
|
titi.y += 100 |
|
|
|
|
|
titi.speed = 5 |
|
|
|
|
|
|
|
|
def update(): |
|
|
def update(): |
|
|
titi.y += titi.speed # mise a jour (60x/sec) de titi |
|
|
titi.y += titi.speed # mise a jour (60x/sec) de titi |
|
|
|
|
|
|
|
|