Forum » » Création-Développement » » 3 mini moteur Hollywood pour un jeux...
Posté : 26-11-2010 19:34
Hello,
@SCREEN {Mode = "ask", Width = 320, Height = 256}
LoadBrush(1, "Fighter1.bmp", {X=0,Y=0,Width=52,Height=52,Transparen cy = #WHITE})
LoadBrush(2, "Fighter1.bmp", {X=52,Y=0,Width=52,Height=52,Transpare ncy = #WHITE})
LoadBrush(3, "Fighter1.bmp", {X=104,Y=0,Width=52,Height=52,Transpar ency = #WHITE})
LoadBrush(4, "Fighter1.bmp", {X=156,Y=0,Width=52,Height=52,Transpar ency = #WHITE})
X=160
Y=100
XB=1
SB=1
LeftMouseQuit(True)
EscapeQuit(True)
Function Joueur()
If IsKeyDown("Left")=False And IsKeyDo wn("Right")=False Then xb=1
If IsKeyDown("Left")=True Then Gauche( )
If IsKeyDown("Right")=True Then Droite ()
AddMove (1,#BRUSH,XB,X,Y)
DoMove(1)
ClearMove(1)
EndFunction
Function Gauche()
If XB=1 Then SB=1
X=X-10
XB=XB+SB
If XB=4 Then SB=-1
If XB=1 Then SB=1
If X<10 Then X=10
EndFunction
Function Droite()
If XB=1 Then SB=1
X=X+10
XB=XB+SB
If XB=4 Then SB=-1
If XB=1 Then SB=1
If X>640 Then X=640
EndFunction
Function PRG()
Cls ; Je veux enlever cette& nbsp;commande
Joueur()
EndFunction
EnableLayers
SetInterval(1,PRG,1000/20)
Repeat
WaitEvent
Forever
Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=923&forum=14