![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Utility for rendering move animations. More...
#include <MoveAnimation.hpp>
Public Types | |
enum | User { Player , Opponent } |
Which peoplemon is using the move. More... | |
Public Member Functions | |
MoveAnimation (bl::engine::Engine &engine) | |
Construct a new Move Animation helper. More... | |
void | init (bl::rc::scene::CodeScene *scene) |
Initializes the animations. More... | |
void | ensureLoaded (const pplmn::BattlePeoplemon &player, const pplmn::BattlePeoplemon &opponent) |
Loads the move animations into the resource manager for the given peoplemon. More... | |
void | playAnimation (User user, pplmn::MoveId move) |
Begins playing the given move animation. More... | |
bool | completed () const |
Returns whether or not the animation has completed playing. More... | |
void | renderBackground (bl::rc::scene::CodeScene::RenderContext &ctx) |
Renders the move animation background. More... | |
void | renderForeground (bl::rc::scene::CodeScene::RenderContext &ctx) |
Renders the move animation foreground. More... | |
Utility for rendering move animations.
Definition at line 21 of file MoveAnimation.hpp.
Which peoplemon is using the move.
Enumerator | |
---|---|
Player | |
Opponent |
Definition at line 26 of file MoveAnimation.hpp.
core::battle::view::MoveAnimation::MoveAnimation | ( | bl::engine::Engine & | engine | ) |
Construct a new Move Animation helper.
engine | The game engine instance |
Definition at line 25 of file MoveAnimation.cpp.
bool core::battle::view::MoveAnimation::completed | ( | ) | const |
Returns whether or not the animation has completed playing.
Definition at line 69 of file MoveAnimation.cpp.
void core::battle::view::MoveAnimation::ensureLoaded | ( | const pplmn::BattlePeoplemon & | player, |
const pplmn::BattlePeoplemon & | opponent | ||
) |
Loads the move animations into the resource manager for the given peoplemon.
player | The player's peoplemon that is out |
opponent | The other peoplemon that is out |
Definition at line 32 of file MoveAnimation.cpp.
void core::battle::view::MoveAnimation::init | ( | bl::rc::scene::CodeScene * | scene | ) |
Initializes the animations.
scene | The scene to use |
Definition at line 30 of file MoveAnimation.cpp.
void core::battle::view::MoveAnimation::playAnimation | ( | User | user, |
pplmn::MoveId | move | ||
) |
Begins playing the given move animation.
user | The peoplemon using the move |
move | The move being used |
Definition at line 49 of file MoveAnimation.cpp.
void core::battle::view::MoveAnimation::renderBackground | ( | bl::rc::scene::CodeScene::RenderContext & | ctx | ) |
Renders the move animation background.
ctx | The render context |
Definition at line 71 of file MoveAnimation.cpp.
void core::battle::view::MoveAnimation::renderForeground | ( | bl::rc::scene::CodeScene::RenderContext & | ctx | ) |
Renders the move animation foreground.
ctx | The render context |
Definition at line 77 of file MoveAnimation.cpp.