Proxy texture for simple frame-based animations.
    public class AnimatedTexture : Texture

AnimatedTexture is a resource format for simple frame-based animations, where multiple frames textures can be chained automatically with a predefined delay for each frame. It’s not a Node, contrarily to AnimationPlayer or AnimatedSprite, but has the advantage of being usable at any place where a Texture resource can be used, e.g. in a TileSet.

The playback of the animation is controlled by the Fps property as well as each frame’s optional delay (see SetFrameDelay(int, float)). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.

AnimatedTexture currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.

Inheritance Chain

Static Fields

    public const Int32 MaxFrames = 256

Constructors

    public AnimatedTexture()

Properties

    public float Fps { get; set; }

Number of frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the Frames property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame’s frame delay (see SetFrameDelay(int, float)). Default value: 4.

For example, an animation with 8 frames, no frame delay and a fps value of 2 will run over 4 seconds, with one frame each 0.5 seconds.

    public float Frame0__delaySec { get; set; }

    public Texture Frame0__texture { get; set; }

    public float Frame1__delaySec { get; set; }

    public Texture Frame1__texture { get; set; }

    public float Frame10__delaySec { get; set; }

    public Texture Frame10__texture { get; set; }

    public float Frame100__delaySec { get; set; }

    public Texture Frame100__texture { get; set; }

    public float Frame101__delaySec { get; set; }

    public Texture Frame101__texture { get; set; }

    public float Frame102__delaySec { get; set; }

    public Texture Frame102__texture { get; set; }

    public float Frame103__delaySec { get; set; }

    public Texture Frame103__texture { get; set; }

    public float Frame104__delaySec { get; set; }

    public Texture Frame104__texture { get; set; }

    public float Frame105__delaySec { get; set; }

    public Texture Frame105__texture { get; set; }

    public float Frame106__delaySec { get; set; }

    public Texture Frame106__texture { get; set; }

    public float Frame107__delaySec { get; set; }

    public Texture Frame107__texture { get; set; }

    public float Frame108__delaySec { get; set; }

    public Texture Frame108__texture { get; set; }

    public float Frame109__delaySec { get; set; }

    public Texture Frame109__texture { get; set; }

    public float Frame11__delaySec { get; set; }

    public Texture Frame11__texture { get; set; }

    public float Frame110__delaySec { get; set; }

    public Texture Frame110__texture { get; set; }

    public float Frame111__delaySec { get; set; }

    public Texture Frame111__texture { get; set; }

    public float Frame112__delaySec { get; set; }

    public Texture Frame112__texture { get; set; }

    public float Frame113__delaySec { get; set; }

    public Texture Frame113__texture { get; set; }

    public float Frame114__delaySec { get; set; }

    public Texture Frame114__texture { get; set; }

    public float Frame115__delaySec { get; set; }

    public Texture Frame115__texture { get; set; }

    public float Frame116__delaySec { get; set; }

    public Texture Frame116__texture { get; set; }

    public float Frame117__delaySec { get; set; }

    public Texture Frame117__texture { get; set; }

    public float Frame118__delaySec { get; set; }

    public Texture Frame118__texture { get; set; }

    public float Frame119__delaySec { get; set; }

    public Texture Frame119__texture { get; set; }

    public float Frame12__delaySec { get; set; }

    public Texture Frame12__texture { get; set; }

    public float Frame120__delaySec { get; set; }

    public Texture Frame120__texture { get; set; }

    public float Frame121__delaySec { get; set; }

    public Texture Frame121__texture { get; set; }

    public float Frame122__delaySec { get; set; }

    public Texture Frame122__texture { get; set; }

    public float Frame123__delaySec { get; set; }

    public Texture Frame123__texture { get; set; }

    public float Frame124__delaySec { get; set; }

    public Texture Frame124__texture { get; set; }

    public float Frame125__delaySec { get; set; }

    public Texture Frame125__texture { get; set; }

    public float Frame126__delaySec { get; set; }

    public Texture Frame126__texture { get; set; }

    public float Frame127__delaySec { get; set; }

    public Texture Frame127__texture { get; set; }

    public float Frame128__delaySec { get; set; }

    public Texture Frame128__texture { get; set; }

    public float Frame129__delaySec { get; set; }

    public Texture Frame129__texture { get; set; }

    public float Frame13__delaySec { get; set; }

    public Texture Frame13__texture { get; set; }

    public float Frame130__delaySec { get; set; }

    public Texture Frame130__texture { get; set; }

    public float Frame131__delaySec { get; set; }

    public Texture Frame131__texture { get; set; }

    public float Frame132__delaySec { get; set; }

    public Texture Frame132__texture { get; set; }

    public float Frame133__delaySec { get; set; }

    public Texture Frame133__texture { get; set; }

    public float Frame134__delaySec { get; set; }

    public Texture Frame134__texture { get; set; }

    public float Frame135__delaySec { get; set; }

    public Texture Frame135__texture { get; set; }

    public float Frame136__delaySec { get; set; }

    public Texture Frame136__texture { get; set; }

    public float Frame137__delaySec { get; set; }

    public Texture Frame137__texture { get; set; }

    public float Frame138__delaySec { get; set; }

    public Texture Frame138__texture { get; set; }

    public float Frame139__delaySec { get; set; }

    public Texture Frame139__texture { get; set; }

    public float Frame14__delaySec { get; set; }

    public Texture Frame14__texture { get; set; }

    public float Frame140__delaySec { get; set; }

    public Texture Frame140__texture { get; set; }

    public float Frame141__delaySec { get; set; }

    public Texture Frame141__texture { get; set; }

    public float Frame142__delaySec { get; set; }

    public Texture Frame142__texture { get; set; }

    public float Frame143__delaySec { get; set; }

    public Texture Frame143__texture { get; set; }

    public float Frame144__delaySec { get; set; }

    public Texture Frame144__texture { get; set; }

    public float Frame145__delaySec { get; set; }

    public Texture Frame145__texture { get; set; }

    public float Frame146__delaySec { get; set; }

    public Texture Frame146__texture { get; set; }

    public float Frame147__delaySec { get; set; }

    public Texture Frame147__texture { get; set; }

    public float Frame148__delaySec { get; set; }

    public Texture Frame148__texture { get; set; }

    public float Frame149__delaySec { get; set; }

    public Texture Frame149__texture { get; set; }

    public float Frame15__delaySec { get; set; }

    public Texture Frame15__texture { get; set; }

    public float Frame150__delaySec { get; set; }

    public Texture Frame150__texture { get; set; }

    public float Frame151__delaySec { get; set; }

    public Texture Frame151__texture { get; set; }

    public float Frame152__delaySec { get; set; }

    public Texture Frame152__texture { get; set; }

    public float Frame153__delaySec { get; set; }

    public Texture Frame153__texture { get; set; }

    public float Frame154__delaySec { get; set; }

    public Texture Frame154__texture { get; set; }

    public float Frame155__delaySec { get; set; }

    public Texture Frame155__texture { get; set; }

    public float Frame156__delaySec { get; set; }

    public Texture Frame156__texture { get; set; }

    public float Frame157__delaySec { get; set; }

    public Texture Frame157__texture { get; set; }

    public float Frame158__delaySec { get; set; }

    public Texture Frame158__texture { get; set; }

    public float Frame159__delaySec { get; set; }

    public Texture Frame159__texture { get; set; }

    public float Frame16__delaySec { get; set; }

    public Texture Frame16__texture { get; set; }

    public float Frame160__delaySec { get; set; }

    public Texture Frame160__texture { get; set; }

    public float Frame161__delaySec { get; set; }

    public Texture Frame161__texture { get; set; }

    public float Frame162__delaySec { get; set; }

    public Texture Frame162__texture { get; set; }

    public float Frame163__delaySec { get; set; }

    public Texture Frame163__texture { get; set; }

    public float Frame164__delaySec { get; set; }

    public Texture Frame164__texture { get; set; }

    public float Frame165__delaySec { get; set; }

    public Texture Frame165__texture { get; set; }

    public float Frame166__delaySec { get; set; }

    public Texture Frame166__texture { get; set; }

    public float Frame167__delaySec { get; set; }

    public Texture Frame167__texture { get; set; }

    public float Frame168__delaySec { get; set; }

    public Texture Frame168__texture { get; set; }

    public float Frame169__delaySec { get; set; }

    public Texture Frame169__texture { get; set; }

    public float Frame17__delaySec { get; set; }

    public Texture Frame17__texture { get; set; }

    public float Frame170__delaySec { get; set; }

    public Texture Frame170__texture { get; set; }

    public float Frame171__delaySec { get; set; }

    public Texture Frame171__texture { get; set; }

    public float Frame172__delaySec { get; set; }

    public Texture Frame172__texture { get; set; }

    public float Frame173__delaySec { get; set; }

    public Texture Frame173__texture { get; set; }

    public float Frame174__delaySec { get; set; }

    public Texture Frame174__texture { get; set; }

    public float Frame175__delaySec { get; set; }

    public Texture Frame175__texture { get; set; }

    public float Frame176__delaySec { get; set; }

    public Texture Frame176__texture { get; set; }

    public float Frame177__delaySec { get; set; }

    public Texture Frame177__texture { get; set; }

    public float Frame178__delaySec { get; set; }

    public Texture Frame178__texture { get; set; }

    public float Frame179__delaySec { get; set; }

    public Texture Frame179__texture { get; set; }

    public float Frame18__delaySec { get; set; }

    public Texture Frame18__texture { get; set; }

    public float Frame180__delaySec { get; set; }

    public Texture Frame180__texture { get; set; }

    public float Frame181__delaySec { get; set; }

    public Texture Frame181__texture { get; set; }

    public float Frame182__delaySec { get; set; }

    public Texture Frame182__texture { get; set; }

    public float Frame183__delaySec { get; set; }

    public Texture Frame183__texture { get; set; }

    public float Frame184__delaySec { get; set; }

    public Texture Frame184__texture { get; set; }

    public float Frame185__delaySec { get; set; }

    public Texture Frame185__texture { get; set; }

    public float Frame186__delaySec { get; set; }

    public Texture Frame186__texture { get; set; }

    public float Frame187__delaySec { get; set; }

    public Texture Frame187__texture { get; set; }

    public float Frame188__delaySec { get; set; }

    public Texture Frame188__texture { get; set; }

    public float Frame189__delaySec { get; set; }

    public Texture Frame189__texture { get; set; }

    public float Frame19__delaySec { get; set; }

    public Texture Frame19__texture { get; set; }

    public float Frame190__delaySec { get; set; }

    public Texture Frame190__texture { get; set; }

    public float Frame191__delaySec { get; set; }

    public Texture Frame191__texture { get; set; }

    public float Frame192__delaySec { get; set; }

    public Texture Frame192__texture { get; set; }

    public float Frame193__delaySec { get; set; }

    public Texture Frame193__texture { get; set; }

    public float Frame194__delaySec { get; set; }

    public Texture Frame194__texture { get; set; }

    public float Frame195__delaySec { get; set; }

    public Texture Frame195__texture { get; set; }

    public float Frame196__delaySec { get; set; }

    public Texture Frame196__texture { get; set; }

    public float Frame197__delaySec { get; set; }

    public Texture Frame197__texture { get; set; }

    public float Frame198__delaySec { get; set; }

    public Texture Frame198__texture { get; set; }

    public float Frame199__delaySec { get; set; }

    public Texture Frame199__texture { get; set; }

    public float Frame2__delaySec { get; set; }

    public Texture Frame2__texture { get; set; }

    public float Frame20__delaySec { get; set; }

    public Texture Frame20__texture { get; set; }

    public float Frame200__delaySec { get; set; }

    public Texture Frame200__texture { get; set; }

    public float Frame201__delaySec { get; set; }

    public Texture Frame201__texture { get; set; }

    public float Frame202__delaySec { get; set; }

    public Texture Frame202__texture { get; set; }

    public float Frame203__delaySec { get; set; }

    public Texture Frame203__texture { get; set; }

    public float Frame204__delaySec { get; set; }

    public Texture Frame204__texture { get; set; }

    public float Frame205__delaySec { get; set; }

    public Texture Frame205__texture { get; set; }

    public float Frame206__delaySec { get; set; }

    public Texture Frame206__texture { get; set; }

    public float Frame207__delaySec { get; set; }

    public Texture Frame207__texture { get; set; }

    public float Frame208__delaySec { get; set; }

    public Texture Frame208__texture { get; set; }

    public float Frame209__delaySec { get; set; }

    public Texture Frame209__texture { get; set; }

    public float Frame21__delaySec { get; set; }

    public Texture Frame21__texture { get; set; }

    public float Frame210__delaySec { get; set; }

    public Texture Frame210__texture { get; set; }

    public float Frame211__delaySec { get; set; }

    public Texture Frame211__texture { get; set; }

    public float Frame212__delaySec { get; set; }

    public Texture Frame212__texture { get; set; }

    public float Frame213__delaySec { get; set; }

    public Texture Frame213__texture { get; set; }

    public float Frame214__delaySec { get; set; }

    public Texture Frame214__texture { get; set; }

    public float Frame215__delaySec { get; set; }

    public Texture Frame215__texture { get; set; }

    public float Frame216__delaySec { get; set; }

    public Texture Frame216__texture { get; set; }

    public float Frame217__delaySec { get; set; }

    public Texture Frame217__texture { get; set; }

    public float Frame218__delaySec { get; set; }

    public Texture Frame218__texture { get; set; }

    public float Frame219__delaySec { get; set; }

    public Texture Frame219__texture { get; set; }

    public float Frame22__delaySec { get; set; }

    public Texture Frame22__texture { get; set; }

    public float Frame220__delaySec { get; set; }

    public Texture Frame220__texture { get; set; }

    public float Frame221__delaySec { get; set; }

    public Texture Frame221__texture { get; set; }

    public float Frame222__delaySec { get; set; }

    public Texture Frame222__texture { get; set; }

    public float Frame223__delaySec { get; set; }

    public Texture Frame223__texture { get; set; }

    public float Frame224__delaySec { get; set; }

    public Texture Frame224__texture { get; set; }

    public float Frame225__delaySec { get; set; }

    public Texture Frame225__texture { get; set; }

    public float Frame226__delaySec { get; set; }

    public Texture Frame226__texture { get; set; }

    public float Frame227__delaySec { get; set; }

    public Texture Frame227__texture { get; set; }

    public float Frame228__delaySec { get; set; }

    public Texture Frame228__texture { get; set; }

    public float Frame229__delaySec { get; set; }

    public Texture Frame229__texture { get; set; }

    public float Frame23__delaySec { get; set; }

    public Texture Frame23__texture { get; set; }

    public float Frame230__delaySec { get; set; }

    public Texture Frame230__texture { get; set; }

    public float Frame231__delaySec { get; set; }

    public Texture Frame231__texture { get; set; }

    public float Frame232__delaySec { get; set; }

    public Texture Frame232__texture { get; set; }

    public float Frame233__delaySec { get; set; }

    public Texture Frame233__texture { get; set; }

    public float Frame234__delaySec { get; set; }

    public Texture Frame234__texture { get; set; }

    public float Frame235__delaySec { get; set; }

    public Texture Frame235__texture { get; set; }

    public float Frame236__delaySec { get; set; }

    public Texture Frame236__texture { get; set; }

    public float Frame237__delaySec { get; set; }

    public Texture Frame237__texture { get; set; }

    public float Frame238__delaySec { get; set; }

    public Texture Frame238__texture { get; set; }

    public float Frame239__delaySec { get; set; }

    public Texture Frame239__texture { get; set; }

    public float Frame24__delaySec { get; set; }

    public Texture Frame24__texture { get; set; }

    public float Frame240__delaySec { get; set; }

    public Texture Frame240__texture { get; set; }

    public float Frame241__delaySec { get; set; }

    public Texture Frame241__texture { get; set; }

    public float Frame242__delaySec { get; set; }

    public Texture Frame242__texture { get; set; }

    public float Frame243__delaySec { get; set; }

    public Texture Frame243__texture { get; set; }

    public float Frame244__delaySec { get; set; }

    public Texture Frame244__texture { get; set; }

    public float Frame245__delaySec { get; set; }

    public Texture Frame245__texture { get; set; }

    public float Frame246__delaySec { get; set; }

    public Texture Frame246__texture { get; set; }

    public float Frame247__delaySec { get; set; }

    public Texture Frame247__texture { get; set; }

    public float Frame248__delaySec { get; set; }

    public Texture Frame248__texture { get; set; }

    public float Frame249__delaySec { get; set; }

    public Texture Frame249__texture { get; set; }

    public float Frame25__delaySec { get; set; }

    public Texture Frame25__texture { get; set; }

    public float Frame250__delaySec { get; set; }

    public Texture Frame250__texture { get; set; }

    public float Frame251__delaySec { get; set; }

    public Texture Frame251__texture { get; set; }

    public float Frame252__delaySec { get; set; }

    public Texture Frame252__texture { get; set; }

    public float Frame253__delaySec { get; set; }

    public Texture Frame253__texture { get; set; }

    public float Frame254__delaySec { get; set; }

    public Texture Frame254__texture { get; set; }

    public float Frame255__delaySec { get; set; }

    public Texture Frame255__texture { get; set; }

    public float Frame26__delaySec { get; set; }

    public Texture Frame26__texture { get; set; }

    public float Frame27__delaySec { get; set; }

    public Texture Frame27__texture { get; set; }

    public float Frame28__delaySec { get; set; }

    public Texture Frame28__texture { get; set; }

    public float Frame29__delaySec { get; set; }

    public Texture Frame29__texture { get; set; }

    public float Frame3__delaySec { get; set; }

    public Texture Frame3__texture { get; set; }

    public float Frame30__delaySec { get; set; }

    public Texture Frame30__texture { get; set; }

    public float Frame31__delaySec { get; set; }

    public Texture Frame31__texture { get; set; }

    public float Frame32__delaySec { get; set; }

    public Texture Frame32__texture { get; set; }

    public float Frame33__delaySec { get; set; }

    public Texture Frame33__texture { get; set; }

    public float Frame34__delaySec { get; set; }

    public Texture Frame34__texture { get; set; }

    public float Frame35__delaySec { get; set; }

    public Texture Frame35__texture { get; set; }

    public float Frame36__delaySec { get; set; }

    public Texture Frame36__texture { get; set; }

    public float Frame37__delaySec { get; set; }

    public Texture Frame37__texture { get; set; }

    public float Frame38__delaySec { get; set; }

    public Texture Frame38__texture { get; set; }

    public float Frame39__delaySec { get; set; }

    public Texture Frame39__texture { get; set; }

    public float Frame4__delaySec { get; set; }

    public Texture Frame4__texture { get; set; }

    public float Frame40__delaySec { get; set; }

    public Texture Frame40__texture { get; set; }

    public float Frame41__delaySec { get; set; }

    public Texture Frame41__texture { get; set; }

    public float Frame42__delaySec { get; set; }

    public Texture Frame42__texture { get; set; }

    public float Frame43__delaySec { get; set; }

    public Texture Frame43__texture { get; set; }

    public float Frame44__delaySec { get; set; }

    public Texture Frame44__texture { get; set; }

    public float Frame45__delaySec { get; set; }

    public Texture Frame45__texture { get; set; }

    public float Frame46__delaySec { get; set; }

    public Texture Frame46__texture { get; set; }

    public float Frame47__delaySec { get; set; }

    public Texture Frame47__texture { get; set; }

    public float Frame48__delaySec { get; set; }

    public Texture Frame48__texture { get; set; }

    public float Frame49__delaySec { get; set; }

    public Texture Frame49__texture { get; set; }

    public float Frame5__delaySec { get; set; }

    public Texture Frame5__texture { get; set; }

    public float Frame50__delaySec { get; set; }

    public Texture Frame50__texture { get; set; }

    public float Frame51__delaySec { get; set; }

    public Texture Frame51__texture { get; set; }

    public float Frame52__delaySec { get; set; }

    public Texture Frame52__texture { get; set; }

    public float Frame53__delaySec { get; set; }

    public Texture Frame53__texture { get; set; }

    public float Frame54__delaySec { get; set; }

    public Texture Frame54__texture { get; set; }

    public float Frame55__delaySec { get; set; }

    public Texture Frame55__texture { get; set; }

    public float Frame56__delaySec { get; set; }

    public Texture Frame56__texture { get; set; }

    public float Frame57__delaySec { get; set; }

    public Texture Frame57__texture { get; set; }

    public float Frame58__delaySec { get; set; }

    public Texture Frame58__texture { get; set; }

    public float Frame59__delaySec { get; set; }

    public Texture Frame59__texture { get; set; }

    public float Frame6__delaySec { get; set; }

    public Texture Frame6__texture { get; set; }

    public float Frame60__delaySec { get; set; }

    public Texture Frame60__texture { get; set; }

    public float Frame61__delaySec { get; set; }

    public Texture Frame61__texture { get; set; }

    public float Frame62__delaySec { get; set; }

    public Texture Frame62__texture { get; set; }

    public float Frame63__delaySec { get; set; }

    public Texture Frame63__texture { get; set; }

    public float Frame64__delaySec { get; set; }

    public Texture Frame64__texture { get; set; }

    public float Frame65__delaySec { get; set; }

    public Texture Frame65__texture { get; set; }

    public float Frame66__delaySec { get; set; }

    public Texture Frame66__texture { get; set; }

    public float Frame67__delaySec { get; set; }

    public Texture Frame67__texture { get; set; }

    public float Frame68__delaySec { get; set; }

    public Texture Frame68__texture { get; set; }

    public float Frame69__delaySec { get; set; }

    public Texture Frame69__texture { get; set; }

    public float Frame7__delaySec { get; set; }

    public Texture Frame7__texture { get; set; }

    public float Frame70__delaySec { get; set; }

    public Texture Frame70__texture { get; set; }

    public float Frame71__delaySec { get; set; }

    public Texture Frame71__texture { get; set; }

    public float Frame72__delaySec { get; set; }

    public Texture Frame72__texture { get; set; }

    public float Frame73__delaySec { get; set; }

    public Texture Frame73__texture { get; set; }

    public float Frame74__delaySec { get; set; }

    public Texture Frame74__texture { get; set; }

    public float Frame75__delaySec { get; set; }

    public Texture Frame75__texture { get; set; }

    public float Frame76__delaySec { get; set; }

    public Texture Frame76__texture { get; set; }

    public float Frame77__delaySec { get; set; }

    public Texture Frame77__texture { get; set; }

    public float Frame78__delaySec { get; set; }

    public Texture Frame78__texture { get; set; }

    public float Frame79__delaySec { get; set; }

    public Texture Frame79__texture { get; set; }

    public float Frame8__delaySec { get; set; }

    public Texture Frame8__texture { get; set; }

    public float Frame80__delaySec { get; set; }

    public Texture Frame80__texture { get; set; }

    public float Frame81__delaySec { get; set; }

    public Texture Frame81__texture { get; set; }

    public float Frame82__delaySec { get; set; }

    public Texture Frame82__texture { get; set; }

    public float Frame83__delaySec { get; set; }

    public Texture Frame83__texture { get; set; }

    public float Frame84__delaySec { get; set; }

    public Texture Frame84__texture { get; set; }

    public float Frame85__delaySec { get; set; }

    public Texture Frame85__texture { get; set; }

    public float Frame86__delaySec { get; set; }

    public Texture Frame86__texture { get; set; }

    public float Frame87__delaySec { get; set; }

    public Texture Frame87__texture { get; set; }

    public float Frame88__delaySec { get; set; }

    public Texture Frame88__texture { get; set; }

    public float Frame89__delaySec { get; set; }

    public Texture Frame89__texture { get; set; }

    public float Frame9__delaySec { get; set; }

    public Texture Frame9__texture { get; set; }

    public float Frame90__delaySec { get; set; }

    public Texture Frame90__texture { get; set; }

    public float Frame91__delaySec { get; set; }

    public Texture Frame91__texture { get; set; }

    public float Frame92__delaySec { get; set; }

    public Texture Frame92__texture { get; set; }

    public float Frame93__delaySec { get; set; }

    public Texture Frame93__texture { get; set; }

    public float Frame94__delaySec { get; set; }

    public Texture Frame94__texture { get; set; }

    public float Frame95__delaySec { get; set; }

    public Texture Frame95__texture { get; set; }

    public float Frame96__delaySec { get; set; }

    public Texture Frame96__texture { get; set; }

    public float Frame97__delaySec { get; set; }

    public Texture Frame97__texture { get; set; }

    public float Frame98__delaySec { get; set; }

    public Texture Frame98__texture { get; set; }

    public float Frame99__delaySec { get; set; }

    public Texture Frame99__texture { get; set; }

    public int Frames { get; set; }

Number of frames to use in the animation. While you can create the frames independently with Frame0__texture.set, you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1.

Methods

    public float GetFps()

Getter for Fps

    public float GetFrameDelay(int frame)

Retrieves the delayed assigned to the given frame ID.

    public int GetFrames()

Getter for Frames

    public Texture GetFrameTexture(int frame)

Retrieves the Texture assigned to the given frame ID.

    public void SetFps(float fps)

Setter for Fps

    public void SetFrameDelay(int frame, float delay)

Defines an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by Fps. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be 1.0 / fps + delay.

For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:

[codeblock]

Frame 0: 0.5 s (1 / fps)

Frame 1: 1.7 s (1 / fps + 1.2)

Frame 2: 0.5 s (1 / fps)

Total duration: 2.7 s

[/codeblock]

    public void SetFrames(int frames)

Setter for Frames

    public void SetFrameTexture(int frame, Texture texture)

Assigns a Texture to the given frame ID. IDs start at 0 (so the first frame has ID 0, and the last frame of the animation has ID Frames - 1).

You can define any frame texture up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to Frames - 1 will be part of the animation.

Tags: