AnimatedScene now defines how a scene with animated sprites and actors is structured and played.

This commit is contained in:
Zed A. Shaw 2025-10-22 00:11:36 -04:00
parent e1da089600
commit 25f7096489
10 changed files with 43 additions and 48 deletions

View file

@ -27,7 +27,7 @@ namespace boss {
struct UI {
shared_ptr<World> $world = nullptr;
Entity $boss_id = NONE;
components::BossFight& $scene;
components::AnimatedScene $scene;
gui::CombatUI $combat_ui;
SpriteTexture $boss_sprite;
SpriteTexture $player_sprite;
@ -44,10 +44,9 @@ namespace boss {
void init();
void render(sf::RenderWindow& window);
bool mouse(float x, float y, guecs::Modifiers mods);
void position_sprite(textures::SpriteTexture& st, const std::string& cell_name, float scale_x, float scale_y, bool at_mid, float x_diff=0.0f, float y_diff=0.0f);
sf::Vector2f position_sprite(textures::SpriteTexture& st, const std::string& cell_name, float scale_x, float scale_y, bool at_mid, float x_diff=0.0f, float y_diff=0.0f);
void status(const std::wstring& msg);
void move_boss(const std::string& cell_name);
void move_player(const std::string& cell_name);
sf::Vector2f move_actor(SpriteTexture& st, const std::string& actor, const std::string& cell_name);
void play_animations();
};
}