![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Renders both the player and opponent stat boxes. More...
#include <StatBoxes.hpp>
Public Member Functions | |
StatBoxes (bl::engine::Engine &engine) | |
Construct a new Stat Boxes component. More... | |
void | init (bl::rc::scene::CodeScene *scene) |
Creates entities and adds them to the scene. More... | |
void | setOpponent (pplmn::BattlePeoplemon *ppl) |
Sets the opponent's peoplemon. Syncs right away. More... | |
void | setPlayer (pplmn::BattlePeoplemon *ppl) |
Sets the player's peoplemon. Syncs right away. More... | |
void | sync (bool fromSwitch=false) |
Updates the UI to reflect the current peoplemon state. More... | |
void | update (float dt) |
Updates bar sizes if they need to change. More... | |
bool | synced () const |
Returns true if the view is in sync, false if an animation is in progress. More... | |
void | render (bl::rc::scene::CodeScene::RenderContext &ctx) |
Renders the boxes. More... | |
Renders both the player and opponent stat boxes.
Definition at line 21 of file StatBoxes.hpp.
core::battle::view::StatBoxes::StatBoxes | ( | bl::engine::Engine & | engine | ) |
Construct a new Stat Boxes component.
engine | The game engine instance |
Definition at line 39 of file StatBoxes.cpp.
void core::battle::view::StatBoxes::init | ( | bl::rc::scene::CodeScene * | scene | ) |
Creates entities and adds them to the scene.
scene | The scene to add to |
Definition at line 49 of file StatBoxes.cpp.
void core::battle::view::StatBoxes::render | ( | bl::rc::scene::CodeScene::RenderContext & | ctx | ) |
void core::battle::view::StatBoxes::setOpponent | ( | pplmn::BattlePeoplemon * | ppl | ) |
Sets the opponent's peoplemon. Syncs right away.
ppl | The opponent's peoplemon |
Definition at line 124 of file StatBoxes.cpp.
void core::battle::view::StatBoxes::setPlayer | ( | pplmn::BattlePeoplemon * | ppl | ) |
Sets the player's peoplemon. Syncs right away.
ppl | The player's peoplemon |
Definition at line 131 of file StatBoxes.cpp.
void core::battle::view::StatBoxes::sync | ( | bool | fromSwitch = false | ) |
Updates the UI to reflect the current peoplemon state.
fromSwitch | True to sync from switch, false for regular sync |
Definition at line 139 of file StatBoxes.cpp.
bool core::battle::view::StatBoxes::synced | ( | ) | const |
Returns true if the view is in sync, false if an animation is in progress.
Definition at line 241 of file StatBoxes.cpp.
void core::battle::view::StatBoxes::update | ( | float | dt | ) |
Updates bar sizes if they need to change.
dt | Time elapsed in seconds |
Definition at line 176 of file StatBoxes.cpp.