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;