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