Very simple items system to get into the inventory work.
This commit is contained in:
parent
1962b0c24e
commit
3d461bce6d
15 changed files with 94 additions and 32 deletions
12
save.cpp
12
save.cpp
|
@ -84,16 +84,16 @@ void save::from_file(fs::path path, DinkyECS::World &world_out, Map &map_out) {
|
|||
}
|
||||
|
||||
void save::load_configs(DinkyECS::World &world) {
|
||||
Config config("./assets/config.json");
|
||||
Config game("./assets/config.json");
|
||||
Config enemies("./assets/enemies.json");
|
||||
Config items("./assets/items.json");
|
||||
Config tiles("./assets/tiles.json");
|
||||
|
||||
world.set_the<Config>(config);
|
||||
world.set_the<MapConfig>({
|
||||
enemies["PLAYER_TILE"]["display"],
|
||||
enemies["UNICORN"]["display"],
|
||||
world.set_the<GameConfig>({
|
||||
game, enemies, items, tiles
|
||||
});
|
||||
|
||||
auto enemy = config["enemy"];
|
||||
auto enemy = game["enemy"];
|
||||
world.set_the<EnemyConfig>({
|
||||
enemy["HEARING_DISTANCE"]
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue