![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Helper for rendering peoplemon in battle and animating them. More...
#include <PeoplemonAnimation.hpp>
Public Types | |
enum | Position { Player , Opponent } |
Which position the peoplemon is in. More... | |
Public Member Functions | |
PeoplemonAnimation (bl::engine::Engine &engine, Position position) | |
Construct a new Peoplemon Animation utility. More... | |
~PeoplemonAnimation () | |
Frees resources. More... | |
void | init (bl::rc::scene::CodeScene *scene) |
Initializes rendering resources. More... | |
void | setPeoplemon (pplmn::Id ppl) |
Sets the specific peoplemon graphic and resets to hidden state. More... | |
void | triggerAnimation (const cmd::Animation &anim) |
Begins playing the given animation. More... | |
void | triggerAnimation (cmd::Animation::Type type) |
Begins playing the given animation by type only. More... | |
bool | completed () const |
Returns true if the animation has completed, false if in progress. More... | |
void | update (float dt) |
Updates the playing animation. More... | |
void | render (bl::rc::scene::CodeScene::RenderContext &ctx) |
Renders the peoplemon animation. More... | |
Helper for rendering peoplemon in battle and animating them.
Definition at line 23 of file PeoplemonAnimation.hpp.
Which position the peoplemon is in.
Enumerator | |
---|---|
Player | |
Opponent |
Definition at line 28 of file PeoplemonAnimation.hpp.
core::battle::view::PeoplemonAnimation::PeoplemonAnimation | ( | bl::engine::Engine & | engine, |
Position | position | ||
) |
Construct a new Peoplemon Animation utility.
engine | The game engine instance |
position | Which position and orientation for the peoplemon |
Definition at line 101 of file PeoplemonAnimation.cpp.
core::battle::view::PeoplemonAnimation::~PeoplemonAnimation | ( | ) |
Frees resources.
Definition at line 108 of file PeoplemonAnimation.cpp.
bool core::battle::view::PeoplemonAnimation::completed | ( | ) | const |
Returns true if the animation has completed, false if in progress.
Definition at line 342 of file PeoplemonAnimation.cpp.
void core::battle::view::PeoplemonAnimation::init | ( | bl::rc::scene::CodeScene * | scene | ) |
Initializes rendering resources.
scene | The scene to use |
Definition at line 112 of file PeoplemonAnimation.cpp.
void core::battle::view::PeoplemonAnimation::render | ( | bl::rc::scene::CodeScene::RenderContext & | ctx | ) |
Renders the peoplemon animation.
ctx | The render context |
Definition at line 585 of file PeoplemonAnimation.cpp.
void core::battle::view::PeoplemonAnimation::setPeoplemon | ( | pplmn::Id | ppl | ) |
Sets the specific peoplemon graphic and resets to hidden state.
ppl | The peoplemon to render |
Definition at line 188 of file PeoplemonAnimation.cpp.
void core::battle::view::PeoplemonAnimation::triggerAnimation | ( | cmd::Animation::Type | type | ) |
Begins playing the given animation by type only.
type | The animation to play |
void core::battle::view::PeoplemonAnimation::triggerAnimation | ( | const cmd::Animation & | anim | ) |
Begins playing the given animation.
anim | The animation to play |
void core::battle::view::PeoplemonAnimation::update | ( | float | dt | ) |
Updates the playing animation.
dt | Time elapsed in seconds |
Definition at line 344 of file PeoplemonAnimation.cpp.
float core::battle::view::PeoplemonAnimation::alpha |
Definition at line 102 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::arrowTime |
Definition at line 105 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::ballTime |
Definition at line 104 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::bounceTime |
Definition at line 107 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::shakeTime |
Definition at line 103 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::slideAmount |
Definition at line 101 of file PeoplemonAnimation.hpp.
float core::battle::view::PeoplemonAnimation::throwX |
Definition at line 106 of file PeoplemonAnimation.hpp.