Beginning state machine for controlling the boss fight UI is up.
This commit is contained in:
parent
1537a81aac
commit
9739441a9c
8 changed files with 173 additions and 135 deletions
|
|
@ -14,9 +14,10 @@ namespace boss {
|
|||
|
||||
enum class State {
|
||||
START=0,
|
||||
BOSS_TURN=1,
|
||||
PLAYER_TURN=2,
|
||||
END=3
|
||||
PLAYER_REQUESTS=1,
|
||||
PLAN_BATTLE=2,
|
||||
EXEC_PLAN=3,
|
||||
END=4
|
||||
};
|
||||
|
||||
class Fight : public DeadSimpleFSM<State, gui::Event> {
|
||||
|
|
@ -26,6 +27,7 @@ namespace boss {
|
|||
combat::BattleEngine $battle;
|
||||
boss::UI $ui;
|
||||
sf::Vector2f mouse_pos{0,0};
|
||||
Entity $player_id = NONE;
|
||||
int run = 0;
|
||||
|
||||
Fight(shared_ptr<World> world, Entity boss_id, Entity player_id);
|
||||
|
|
@ -34,11 +36,13 @@ namespace boss {
|
|||
bool event(gui::Event ev, std::any data);
|
||||
|
||||
void START(gui::Event ev, std::any data);
|
||||
void BOSS_TURN(gui::Event ev, std::any data);
|
||||
void PLAYER_TURN(gui::Event ev, std::any data);
|
||||
void PLAYER_REQUESTS(gui::Event ev, std::any data);
|
||||
void PLAN_BATTLE(gui::Event ev, std::any data);
|
||||
void EXEC_PLAN(gui::Event ev, std::any data);
|
||||
void END(gui::Event ev, std::any data);
|
||||
void render(sf::RenderWindow& window);
|
||||
|
||||
void run_systems();
|
||||
bool player_dead();
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue