|
@@ -1 +1,30 @@ |
|
|
print('Hello world !') |
|
|
|
|
|
|
|
|
import pgzrun |
|
|
|
|
|
|
|
|
|
|
|
TITLE = "Paf l'oiseau" |
|
|
|
|
|
WIDTH = 400 |
|
|
|
|
|
HEIGHT = 500 |
|
|
|
|
|
|
|
|
|
|
|
def on_mouse_down():#Arrête l'itération quand on clic sur la souris |
|
|
|
|
|
print('clic souris !') |
|
|
|
|
|
#titi.x == StopIteration |
|
|
|
|
|
#titi.y == StopIteration |
|
|
|
|
|
titi.x += 30 # équivalent à titi.y = titi.y - 50 |
|
|
|
|
|
titi.y -= 30 |
|
|
|
|
|
|
|
|
|
|
|
def on_mouse_up():#Avance quand on lache la souris |
|
|
|
|
|
print("Don't clic souris ! " ) |
|
|
|
|
|
|
|
|
|
|
|
def draw(): |
|
|
|
|
|
screen.blit('cascade', (0, 0)) |
|
|
|
|
|
titi.draw() |
|
|
|
|
|
|
|
|
|
|
|
titi = Actor('bird1', (0, 0)) |
|
|
|
|
|
|
|
|
|
|
|
def update(): |
|
|
|
|
|
titi.y += titi.speed |
|
|
|
|
|
titi.speed = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pgzrun.go() |