animated_texture

the methods for the animated_texture object

autoplay(enable)allows you to enable and disable the autoplay mode of this animated texture, resets the state of the animation to start
play()plays the animation once and then stops.
resume()stats playing the animation.
pause()stops playing the animation.
change_duration(time)changes the lenght of the animation.
set_frame(frame)changes the current frame of the animation
fieldsthe fields stored in the animated_texture object
autoplay(enable)Source

allows you to enable and disable the autoplay mode of this animated texture, resets the state of the animation to start

Parameters

  1. enable boolean whether to enable or disable autoplay

Returns

  1. animated_texture returns self. used for chaining functions.
play()Source

plays the animation once and then stops.

Returns

  1. animated_texture returns self. used for chaining functions.
resume()Source

stats playing the animation. Continues where it left off.

Returns

  1. animated_texture returns self. used for chaining functions.
pause()Source

stops playing the animation. keeps its current state.

Returns

  1. animated_texture returns self. used for chaining functions.
change_duration(time)Source

changes the lenght of the animation.

Parameters

  1. time number the amount of ms the animation should take to play.

Returns

  1. animated_texture returns self. used for chaining functions.
set_frame(frame)Source

changes the current frame of the animation

Parameters

  1. frame number the frame to set the animation tp

Returns

  1. animated_texture returns self. used for chaining functions.
fieldsSource

the fields stored in the animated_texture object

wthe width of the sprites
hthe height of the sprites
sprites_collumthe amount of frames (sprites on the y axis)
spritestable with all of the sprites from the sprite sheet
durationlenght of the animation in milliseconds
sprite_xX index of this animation in the sprite sheet
last_updatedthe epoch time since the texture frame was last changed
current_sprite_indexcurrent frame the animation is on
pixelspixels of the current sprite displayed
runningwhether the animation is currently playing
wSource

the width of the sprites

hSource

the height of the sprites

sprites_collumSource

the amount of frames (sprites on the y axis)

spritesSource

table with all of the sprites from the sprite sheet

durationSource

lenght of the animation in milliseconds

sprite_xSource

X index of this animation in the sprite sheet

last_updatedSource

the epoch time since the texture frame was last changed

current_sprite_indexSource

current frame the animation is on

pixelsSource

pixels of the current sprite displayed

runningSource

whether the animation is currently playing