Played with UI layouts but keeping this for now. Fixed up config so it has keys() and now we load a boss per level.
This commit is contained in:
parent
281a7f687a
commit
5c815cf755
6 changed files with 35 additions and 8 deletions
|
@ -39,7 +39,12 @@ shared_ptr<gui::BossFightUI> LevelManager::create_bossfight(shared_ptr<DinkyECS:
|
|||
dbc::check(prev_world != nullptr, "Starter world for boss fights can't be null.");
|
||||
auto world = clone_load_world(prev_world);
|
||||
auto& config = prev_world->get_the<GameConfig>();
|
||||
auto& boss_data = config.bosses["DEVILS_FINGERS"];
|
||||
|
||||
// BUG: the jank is too strong here
|
||||
auto boss_names = config.bosses.keys();
|
||||
auto& level_name = boss_names[$current_level % boss_names.size()];
|
||||
auto& boss_data = config.bosses[level_name];
|
||||
|
||||
auto boss_id = world->entity();
|
||||
components::configure_entity($components, *world, boss_id, boss_data["components"]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue