Einzelnen Beitrag anzeigen

Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#1

[DelphiX] Animation bewegt sich nicht bzw B. wird nicht ang.

  Alt 7. Jul 2004, 14:01
Hi,


Delphi-Quellcode:
TAnimation = class(TImageSprite);

var
  Form1: TForm1;
  Animation : TAnimation;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Animation := TAnimation.Create(DXSpriteEngine1.Engine);
  Animation.Image := Form1.DXImageList1.Items.Find('1');
  Animation.X := 0;
  Animation.Y := 0;
  Animation.Width := Animation.Image.Width;
  Animation.Height := Animation.Image.Height;
  Animation.AnimCount := 5;
  Animation.AnimLooped := true;
  Animation.AnimSpeed := 20/1000;
  Animation.AnimStart := 0;
end;

procedure TForm1.DXTimer1Timer(Sender: TObject; LagCount: Integer);
begin
  DXSpriteEngine1.Move(1);
  DXDraw1.Surface.Fill(0);
  DXSpriteEngine1.Draw;
  DXDraw1.Flip;
end;
So steht der Code im Tutorial drinne, aber bei mir tut sich nix. Ich hab alles richtig zugewießen, etc. Es kommt keine Fehlermeldung oder so. Das DXDraw bleibt einfach schwarz.
  Mit Zitat antworten Zitat