Light works with multiple sources and strengths, walls are faked out but I think I may keep that to make it easier to play.

This commit is contained in:
Zed A. Shaw 2024-11-27 04:02:57 -05:00
parent 6174df5ec7
commit 0e8a2e520a
5 changed files with 55 additions and 14 deletions

View file

@ -33,7 +33,7 @@ void configure_world(DinkyECS::World &world, Map &game_map) {
world.set<Combat>(player.entity, {100, 10});
world.set<Tile>(player.entity, {config.PLAYER_TILE});
world.set<Inventory>(player.entity, {5});
world.set<LightSource>(player.entity, {150});
world.set<LightSource>(player.entity, {50});
auto enemy = world.entity();
world.set<Position>(enemy, {game_map.place_entity(1)});
@ -46,11 +46,18 @@ void configure_world(DinkyECS::World &world, Map &game_map) {
world.set<Motion>(enemy2, {0,0});
world.set<Combat>(enemy2, {20, 10});
world.set<Tile>(enemy2, {"*"});
world.set<LightSource>(enemy2, {100});
auto gold = world.entity();
world.set<Position>(gold, {game_map.place_entity(3)});
world.set<Loot>(gold, {100});
world.set<Tile>(gold, {"$"});
auto wall_torch = world.entity();
world.set<Position>(wall_torch, {game_map.place_entity(4)});
world.set<LightSource>(wall_torch, {200});
world.set<Tile>(wall_torch, {"!"});
}
const int GAME_MAP_X = 40;