Also bisher sieht mein Code so aus (nicht wirklich viel
)
Delphi-Quellcode:
var
movex,movey : integer;
procedure TForm1.FormCreate(Sender: TObject); //Einstellungen und Koordinaten
begin
form1.DoubleBuffered :=true;
movex := 1;
movey := 225;
end;
procedure TForm1.Gehen(Sender: TObject); //Gehen
begin
Timer2.Enabled := true
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
Player.Picture.LoadFromFile('.\Graphiken\Charanimation1.ico');
Player.Picture.LoadFromFile('.\Graphiken\Charanimation2.ico');
Player.Picture.LoadFromFile('.\Graphiken\Charanimation3.ico');
end;
procedure Char;
begin
Form1.Player.left := moveX;
Form1.Player.top := moveY;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
I: Integer;
begin
if (key = 40) then moveY := moveY+5;// runter
if (key = 38) then movey := moveY-5;// hoch
if (key = 37) then movex := moveX-5;// links
if (key = 39) then movex := moveX+5;// rechts
if (key = 39) then Timer2.Enabled := true;
Char;
end;
end.
Und das mit Andorra versteh ich nicht. Wie benutze ich Andorra?