Chapter 3: Animated Textures

An AnimatedTexture is a structure that extends the functionality of the SpriteSheet by adding a time delay between frames, which allows for the animation of the sprite.

  • sprite_sheet: This field contains the reference to the SpriteSheet to be animated.

  • frame_delay: This field sets the time delay between frame changes, giving control over the animation speed.

  • current_frame: The index of the current frame of the sprite being rendered.

  • last_frame_time: The time at which the frame was last updated.

Last updated