//=============================================================================
// AnimatedSprite.
//=============================================================================
class AnimatedSprite expands WildcardsFX;

var() texture SpriteFrame[40];
var() int Frames;
var() float AnimationLength;
var int CurrentFrame;

simulated event BeginPlay()
{
    CurrentFrame = 0;
	Texture = SpriteFrame[CurrentFrame];
    SetTimer(AnimationLength/Frames,true);
}

simulated function timer()
{
	CurrentFrame++;
	if ( CurrentFrame == Frames+1 )
		Destroy();
	Texture = SpriteFrame[CurrentFrame];
}

defaultproperties
{
}
