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 |
fields | the 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
- enable boolean whether to enable or disable autoplay
Returns
- animated_texture returns self. used for chaining functions.
- play()Source
plays the animation once and then stops.
Returns
- animated_texture returns self. used for chaining functions.
- resume()Source
stats playing the animation. Continues where it left off.
Returns
- animated_texture returns self. used for chaining functions.
- pause()Source
stops playing the animation. keeps its current state.
Returns
- animated_texture returns self. used for chaining functions.
- change_duration(time)Source
changes the lenght of the animation.
Parameters
- time number the amount of ms the animation should take to play.
Returns
- animated_texture returns self. used for chaining functions.
- set_frame(frame)Source
changes the current frame of the animation
Parameters
- frame number the frame to set the animation tp
Returns
- animated_texture returns self. used for chaining functions.
- fieldsSource
the fields stored in the animated_texture object
w the width of the sprites h the height of the sprites sprites_collum the amount of frames (sprites on the y axis) sprites table with all of the sprites from the sprite sheet duration lenght of the animation in milliseconds sprite_x X index of this animation in the sprite sheet last_updated the epoch time since the texture frame was last changed current_sprite_index current frame the animation is on pixels pixels of the current sprite displayed running whether 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