|
Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine. GitHub | Vesper Updates | Creator |
Animates through a series of sub textures. More...
#include <Components.h>
Public Member Functions | |
| TextureAnimationComponent ()=default | |
| TextureAnimationComponent (const TextureAnimationComponent &)=default | |
| TextureAnimationComponent (const std::vector< Ref< SubTexture2D > > &subTextures, float frameTime) | |
| Constructor that initializes the sub-textures and frame time. | |
| operator std::vector< Ref< SubTexture2D > > & () | |
| operator const std::vector< Ref< SubTexture2D > > & () const | |
| std::vector< Ref< SubTexture2D > > & | GetSubTextures () |
| uint32_t | GetCurrentFrame () const |
| Returns the index of the current frame. | |
| void | Update (float deltaTime) |
| Updates the animation based on the elapsed time. | |
Public Attributes | |
| std::vector< Ref< SubTexture2D > > | SubTextures |
| The list of sub-textures for the animation. | |
| uint32_t | CurrentFrame = 0 |
| The current frame index. | |
| float | FrameTime = 0.6f |
| Time per frame in seconds. | |
| float | TimeAccumulator = 0.0f |
| Accumulated time for frame switching. | |
Animates through a series of sub textures.
(can be used with full textures)
|
default |
|
default |
|
inline |
Constructor that initializes the sub-textures and frame time.
| subTextures | Vector of sub-textures for the animation. |
| frameTime | Time per frame in seconds. |
|
inline |
Returns the index of the current frame.
|
inline |
|
inline |
|
inline |
|
inline |
Updates the animation based on the elapsed time.
| deltaTime | The elapsed time since the last update. |
| uint32_t Vesper::TextureAnimationComponent::CurrentFrame = 0 |
The current frame index.
| float Vesper::TextureAnimationComponent::FrameTime = 0.6f |
Time per frame in seconds.
| std::vector<Ref<SubTexture2D> > Vesper::TextureAnimationComponent::SubTextures |
The list of sub-textures for the animation.
| float Vesper::TextureAnimationComponent::TimeAccumulator = 0.0f |
Accumulated time for frame switching.