animation
Übersicht

![]() |
sectorBetreff: animation |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi,
haltet mich ruhig für etwas dämlich aber ich komm net druff. Wie krieg ich das hin das wenn ich links drücke er bild 0, bei rechts bild 2 und wenn ich nix drücke er bild 1 darstellt? Ich hab alles mögliche ausprobiert aber...scheine heute echt Hirnleere zu haben ![]() AnimImage besteht also aus 3 bildern. Code: [AUSKLAPPEN] Function Display_Player () If MilliSecs() > fframe + 10 Then fframe=MilliSecs() fframe=(fframe + 1) fframe=1 End If If Player_Alive And Game_Playing DrawImage fighter, Player_PosX , Player_PosY-50,fframe If KeyDown ( Key_Up ) Then Player_PosY = Player_PosY - Player_Speed If KeyDown ( Key_Down ) Then Player_PosY = Player_PosY + Player_Speed If KeyDown ( Key_Left ) Then Player_PosX = Player_PosX - Player_Speed --- hier müsste doch was hin?1 --- If KeyDown ( Key_Right ) Then Player_PosX = Player_PosX + Player_Speed End If End Function Danke sector |
||
Projekt : RetroAge Team |
HOT-BITGast |
![]() Antworten mit Zitat |
|
---|---|---|
Hoi,
du mußt bei den Abfragen auch deine Variable >fframe< ändern ! Aber irgendwas stimmt da sowieso nicht, mit dieser Variable ! Schau dir das mal an ! Code: [AUSKLAPPEN] If MilliSecs() > fframe + 10 Then fframe=MilliSecs() fframe=(fframe + 1) fframe=1 End If Toni |
||
![]() |
RallimenSieger des 30-EUR-Wettbewerbs |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hier, so müßte es gehen Code: [AUSKLAPPEN] Function Display_Player () ; global Frametime,Richtungsframe
If MilliSecs() > Frametime + 10 Then Frametime=MilliSecs() If Player_Alive And Game_Playing DrawImage fighter, Player_PosX , Player_PosY-50,Richtungsframe If KeyDown ( Key_Up ) Then Player_PosY = Player_PosY - Player_Speed If KeyDown ( Key_Down ) Then Player_PosY = Player_PosY + Player_Speed If KeyDown ( Key_Left ) Then Player_PosX = Player_PosX - Player_Speed Richtungsframe = 0 Return End If If KeyDown ( Key_Right ) Then Player_PosX = Player_PosX + Player_Speed Richtungsframe = 2 Return End If Richtungsframe = 1; falls kein left right war dann dieses End If EndIf End Function |
||
[BB2D | BB3D | BB+]
|
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group