@@ -1,21 +1,27 @@ | |||||
import pgzrun | import pgzrun | ||||
TITLE = "Paf l'oiseau" | |||||
TITLE = "paf l'oiseau" | |||||
WIDTH = 400 | WIDTH = 400 | ||||
HEIGHT = 708 | HEIGHT = 708 | ||||
def on_mouse_down(): | |||||
print('Clic souris !') | |||||
titi.y -= 50 | |||||
titi= Actor('bird1', (75, 350)) | |||||
def update(): | |||||
titi.y += 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.speed = 1 | |||||
def on_mouse_down(): | |||||
print('Clic souris !') | |||||
titi.y -= 50 # | |||||
def on_mouse_up(): | |||||
print('mouse up') | |||||
titi.y -= 20 | |||||
def update(): | |||||
titi.y += 1 | |||||
titi.speed = 1 | |||||
titi.y += titi.speed | |||||
pgzrun.go() | pgzrun.go() |