I have a stupid issue...
I create the sprite engine:
Code:
Sprites:=TSpriteEngine.Create(nil);
Sprites.Images:=Images;
Sprites.Canvas:=MyCanvas;
I then define a class (for testing):
Code:
type
TScroller = class(TSprite)
public
procedure DoMove(const MoveSpeed:single); override;
end;
Next, I create the sprites:
Code:
images.AddFromASDb('scrollfont.image',asdb);
with TScroller.create(sprites) do
begin
X:=100;
Y:=100;
Width:=64;
Height:=64;
ImageName:='scrollfont.image';
Patternindex:=33;
end;
In the RenderEvent I have:
Code:
sprites.draw;
sprites.move(1);
sprites.dead;
In the sprites DoMove I have:
Code:
procedure TScroller.DoMove(const MoveCount: Single);
begin
inherited;
x:=x-1.0;
end;
And the sprite moves so fast, I can't barely see it!
It is moving with the framerate, which is 2300FPS.
What am I doing wrong??? I am totally lost now.