1 #ifndef GAME_BATTLES_BATTLEVIEW_HPP
2 #define GAME_BATTLES_BATTLEVIEW_HPP
4 #include <BLIB/Render/Scenes/CodeScene.hpp>
13 #include <SFML/Graphics.hpp>
14 #include <SFML/Graphics/RenderTarget.hpp>
45 void init(bl::rc::scene::CodeScene* scene);
98 void render(bl::rc::scene::CodeScene::RenderContext& ctx);
101 bl::engine::Engine& engine;
110 bl::rc::res::TextureRef bgndTxtr;
111 bl::gfx::Sprite background;
113 virtual bool observe(
const bl::input::Actor&,
unsigned int activatedControl,
114 bl::input::DispatchType,
bool eventTriggered)
override;
Core classes and functionality for both the editor and game.
Stores and represents the current state of a battle. This is the base class for local and remote batt...
This is the top level class for rendering battles. It takes commands and state from a BattleControlle...
view::PlayerMenu & menu()
Access the player's menu.
void render(bl::rc::scene::CodeScene::RenderContext &ctx)
Renders the battle view.
void init(bl::rc::scene::CodeScene *scene)
Initializes renderer data, loads resources, and adds entities to the scene.
bool playerChoseToSetName() const
Returns whether or not the player chose to set a nickname on a new Peoplemon.
bool playerChoseForgetMove() const
Returns whether or not the player chose to forget a move when prompted.
void update(float dt)
Updates the view, including contained animations and printing text.
void hideText()
Hides the battle text when the view is synced.
void processCommand(const Command &command)
Processes a command and updates the view.
const std::string & chosenNickname() const
Returns the nickname the player entered.
bool actionsCompleted() const
Returns true if the view is done going through the queued commands and all components are synchronize...
BattleView(bl::engine::Engine &engine, BattleState &state, bool canRun)
Construct a new Battle View.
Emitted by the BattleFSM. All UI is handled via a queue of commands. Commands are resolved in the ord...
Helper utility for printing battle messages.
Utility for rendering move animations.
Helper for rendering peoplemon in battle and animating them.
The player menu for battles.
Renders both the player and opponent stat boxes.