Sprite is now a component we can place on anything to render it.
This commit is contained in:
parent
9c37960283
commit
6bca6d021e
8 changed files with 50 additions and 26 deletions
|
@ -234,6 +234,8 @@ void WorldBuilder::randomize_entities(DinkyECS::World &world, GameConfig &config
|
|||
|
||||
int rand_entity = Random::uniform<int>(0, keys.size() - 1);
|
||||
std::string key = keys[rand_entity];
|
||||
// BUG: this may crash if PLAYER_TILE isn't first
|
||||
if(key == "PLAYER_TITLE") key = keys[rand_entity + 1];
|
||||
auto entity_data = entity_db[key];
|
||||
|
||||
// pass that to the config as it'll be a generic json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue