Vorschlag :
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
begin
Animation := TAnimation.Create(DXSpriteEngine1.Engine);
with Animation do begin
Image := Form1.DXImageList1.Items.Find('1'); // *
X := 0;
Y := 0;
Width := Animation.Image.Width; // *
Height := Animation.Image.Height; // *
AnimCount := 5;
AnimLooped := True;
AnimSpeed := 20/1000;
AnimStart := 0;
end;
end;
*) = Kann man auch (bzw würde ich) in TAnimation.Create schreiben.
(Dafür die Create Procedure überschreiben !)