Can actually save the game now.
This commit is contained in:
parent
b2ed598c1f
commit
67cacd5dcd
3 changed files with 4 additions and 9 deletions
3
main.cpp
3
main.cpp
|
@ -19,9 +19,6 @@ namespace fs = std::filesystem;
|
||||||
*/
|
*/
|
||||||
void configure_world(DinkyECS::World &world, Map &game_map) {
|
void configure_world(DinkyECS::World &world, Map &game_map) {
|
||||||
const auto &config = world.get_the<MapConfig>();
|
const auto &config = world.get_the<MapConfig>();
|
||||||
// this sets up the gui event system
|
|
||||||
world.set_the<Events::GUI>(Events::GUI::START);
|
|
||||||
|
|
||||||
// configure a player as a fact of the world
|
// configure a player as a fact of the world
|
||||||
Player player{world.entity()};
|
Player player{world.entity()};
|
||||||
world.set_the<Player>(player);
|
world.set_the<Player>(player);
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
* src/ftxui/screen/color_info.hpp has pallete.
|
|
||||||
* src/ftxui/screen/color.cpp
|
|
||||||
* Just search for ugrep x1B
|
|
||||||
* https://man7.org/linux/man-pages/man4/console_codes.4.html
|
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,10 @@ void System::enemy_pathing(DinkyECS::World &world, Map &game_map, Player &player
|
||||||
void System::init_positions(DinkyECS::World &world) {
|
void System::init_positions(DinkyECS::World &world) {
|
||||||
auto &collider = world.get_the<spatial_map>();
|
auto &collider = world.get_the<spatial_map>();
|
||||||
|
|
||||||
world.query<Position>([&](const auto &ent, auto &pos) {
|
world.query<Position, Combat>([&](const auto &ent, auto &pos, auto &combat) {
|
||||||
collider.insert(pos.location, ent);
|
if(!combat.dead) {
|
||||||
|
collider.insert(pos.location, ent);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue