UGDK
0.5.0
|
#include <ugdk/action/animationplayer.h>
Public Types | |
using | Animation = ::ugdk::action::Animation< Frame > |
using | AnimationTable = structure::IndexableTable< Animation > |
using | FrameChangedCallback = std::function< void(const Frame &)> |
Public Member Functions | |
AnimationPlayer (const AnimationTable *table) | |
void | set_frame_change_callback (const FrameChangedCallback &callback) |
const Animation * | current_animation () const |
const Frame & | current_animation_frame () const |
void | Update (double dt) |
void | RestartAnimation () |
Restarts the current animation from the first frame. More... | |
void | Select (const std::string &name) |
Change the current animation to a new animation from the previously selected AnimationSet. More... | |
void | Select (int index) |
Change the current animation to a new animation from the previo2usly selected AnimationSet. More... | |
void | Refresh () |
Calls the frame changed callback with the current frame. More... | |
Public Member Functions inherited from ugdk::action::MediaPlayer | |
MediaPlayer () | |
virtual | ~MediaPlayer () |
void | AddObserver (Observer *observer) |
Add a observer object to the animation. More... | |
void | AddTickFunction (std::function< void(void)> tick) |
void | ChangeMediaManager (MediaManager *) |
Additional Inherited Members | |
Protected Member Functions inherited from ugdk::action::MediaPlayer | |
void | notifyAllObservers () |
using ugdk::action::AnimationPlayer< Frame >::Animation = ::ugdk::action::Animation<Frame> |
using ugdk::action::AnimationPlayer< Frame >::AnimationTable = structure::IndexableTable<Animation> |
using ugdk::action::AnimationPlayer< Frame >::FrameChangedCallback = std::function<void(const Frame&)> |
|
inline |
|
inline |
|
inline |
|
inline |
Calls the frame changed callback with the current frame.
|
inline |
Restarts the current animation from the first frame.
|
inline |
Change the current animation to a new animation from the previously selected AnimationSet.
Given a animation name (a string), the function changes the current animation to a new animation of AnimationSet
|
inline |
Change the current animation to a new animation from the previo2usly selected AnimationSet.
Given a animation index (a integer), the function changes the current animation to a new animation of AnimationSet
|
inline |
|
inlinevirtual |
Implements ugdk::action::MediaPlayer.