I check...
Yes, you are right.
Thanks.
The complete TParticleSprite class should be like this:
Code:
TParticleSprite = class(TAnimSprite)
private
FAccelX: Real;
FAccelY: Real;
FVelocityX: Real;
FVelocityY: Real;
FUpdateSpeed : Single;
FDecay: Real;
FLifeTime: Real;
public
constructor Create(const AParent: TSpriteEngine); override;
procedure Move(const MoveCount: Single); override;
property AccelX: Real read FAccelX write FAccelX;
property AccelY: Real read FAccelY write FAccelY;
property VelocityX: Real read FVelocityX write FVelocityX;
property VelocityY: Real read FVelocityY write FVelocityY;
property UpdateSpeed : Single read FUpdateSpeed write FUpdateSpeed;
property Decay: Real read FDecay write FDecay;
property LifeTime: Real read FLifeTime write FLifeTime;
end;
constructor TParticleSprite.Create(const AParent: TSpriteEngine);
begin
inherited;
FAccelX := 0;
FAccelY := 0;
FVelocityX := 0;
FVelocityY := 0;
FUpdateSpeed :=0;
FDecay := 0;
FLifeTime := 1;
end;
procedure TParticleSprite.Move(const MoveCount: Single);
begin
inherited;
X:= X + FVelocityX * UpdateSpeed;
Y:= Y + FVelocityY * UpdateSpeed;
FVelocityX := FVelocityX + FAccelX * UpdateSpeed;
FVelocityY := FVelocityY + FAccelY * UpdateSpeed;
FLifeTime := FLifeTime - FDecay;
if FLifeTime <= 0 then Dead;
end;
I'm release this version of sprite engine in a hurry, so...
