found this "bug":
[pascal]
procedure TPHXAnimation.Update(State: PPHXAnimationState; FrameTime: Single);
var Frame: TPHXAnimationFrame;
begin
// Only update if active
if( State^.Active) then begin
// Add the time to the state
State^.Time := State^.Time + FrameTime;
// Get the current frame
Frame:=FFrames[State^.Index];
// test if we shall change to the next frame
if( State^.Time > Frame.Time ) then begin
Inc(State^.Index);
// Test if we reached the end of the animation
if( State^.Index = Count) then begin //What if state is larger than count?
[/pascal]
I found the problem when my sprites suddenly stopped worked when changing animation length from 4 to 1. wich would effectively make "State^.Index" larger than "Count".
the solution is obvious...
(and i have just spent an hour and a half trying to figure out what made my sprites disappear when i stopped moving)
Bookmarks