AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Animation wird nicht richtig abgespielt mit DelphiX
Thema durchsuchen
Ansicht
Themen-Optionen

Animation wird nicht richtig abgespielt mit DelphiX

Ein Thema von theCOW · begonnen am 23. Jan 2005 · letzter Beitrag vom 23. Jan 2005
 
Benutzerbild von Die Muhkuh
Die Muhkuh

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

Re: Animation wird nicht richtig abgespielt mit DelphiX

  Alt 23. Jan 2005, 12:47
Hi,

ich kann dir das nicht bestätigen. Bei mir wird alles angezeigt.

Aber mir ist was anderes aufgefallen:

Delphi-Quellcode:
constructor TAnimation.Create(AParent: TSprite);
begin
  inherited Create(AParent);
  Image := Form1.DXImageList1.Items.Find('1');
  Width := Image.Width;
  Height := Image.Height;
  Visible := true;

  AnimCount := 4;
  AnimLooped := true;
  AnimSPeed := 24/100;
  AnimStart := 0;
end;

procedure TAnimation.DoMove(MoveCount: integer);
begin

  inherited DoMove(MoveCount);


  if FMove = true then
  begin

    if (IsUp in Form1.DXInput1.States) and (Y >= 0) then
      Y := Y-vY;
    if (IsDown in Form1.DXInput1.States) and (Y+Height <= Form1.DXDraw1.Height) then
      Y := Y+vY;
    if (IsLeft in Form1.DXInput1.States) and (X >= 0) then
      X := X-vX;
    if (ISRight in Form1.DXInput1.States) and (X+Width <= Form1.DXDraw1.Width) then
      X := X+vX;


  (*  AnimCount := 4;
    AnimLooped := true;
    AnimSPeed := 24/100;
    AnimStart := 0; *)
 // Da gehört ins OnCreate und nicht in die DoMove-Procedure!

    Collision;
  end
  else
    if FCollision then
    begin
      if AnimPos = 3 then
        Dead;
    end;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:47 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz