This is a plugin for Matt Rix’s Futile Framework, https://github.com/MattRix/Futile, that allows for animations to be loaded and played using FAnimSprite.
Naming ConventionThe naming convention of all assets must be as follows: SpriteID-Animation-FrameNum-Delay
SpriteID will be parsed as a string to be used for referencing sprite data.
Animation will be parsed as a string for which animation set it belongs to. ** is optional **
Frame is parsed as an int to be used for sorting frame list ** is optional, needs to be implemented **
Delay will be parsed as a float value. indicates FPS for animation to be played at. ** optional, uses 60FPS by default **
UseSo, steps to use animations:
- Replace all
2)FAnimSprite construtor takes in the SpriteID (outlined in the Naming Convention)
FAnimSprite mySprite = new FAnimSprite(“SuperDude”);
3)To change the animation of the asset call setAnimation(“animationName”)
4)To change the atlas/id of a sprite, just use FAnimSprite.load(“SpriteID”);
//mySprite is currently using the SuperDude sprite data. next line changes it to use EvilDude images and data
Playback SpeedSo, knowing that it's impossible to have enough control, I've added the ability to control the speed at which
animations are played, during runtime. If you want to speed them up during their playback, just use it like the
//speeds up the animation playback by 2x
mySprite.PlaySpeed = 2.0f;
//slows the animation playback to half
mySprite.PlaySpeed = 0.5f;
//the default speed, as in the delta time added to the delay is unchanged
mySprite.PlaySpeed = 1.0f;
More To Come
-anything suggested by other users!