Le code de mon projet :
gravity=(1)
xniveau=(0)
yniveau=(0)
Orix=(500)
Oriy=(250)
def setup():
size(1000,500)
background(50)
frameRate(6)
global img
global img1
global img2
img = loadImage("Niveau1.png")
img1 = loadImage("Personnage1.png")
img2= loadImage("Decor1.png")
def draw():
clear
#image(img2,0,0)
#image(img,xniveau,yniveau)
image(img1,Orix,Oriy,img1.width / 2, img1.height / 2)
print(xniveau,yniveau,Orix,Oriy)
' ' '
def gameloop():
if key==CODED:
if keyCode==UP:
Oriy= Oriy+10
def keyPressed():
if key != CODED:
key_code = ord(key)
else:
key_code = keyCode
if a_code == key_code:
Oriy= Oriy+10
print(key)
' ' '


Data:

