What problem does this solve or what need does it fill?
For example i have player with sprite, and player have Hp and HpBar. I use separate entity for render HpBar . And when i update hpbar, i am getting player children and get first child. This is not comfortable.
What solution would you like?
Add functions for world:
impl World {
fn get_entity_from_path(&self, path: &str) -> Entity {...}
fn get_path_from_entity(&self, entity: &Entity) -> String {...}
...
}
Path will be like "EntityId or Name/EntityId or Name/...."
Example:
fn update_hp_bar(world: World) {
... Get Player entity
let hpbar_entity = world.get_entity_from_path(world.get_path_from_entity(&player_entity) + "/hpbar");
... Process hpbar
}
What problem does this solve or what need does it fill?
For example i have player with sprite, and player have Hp and HpBar. I use separate entity for render HpBar . And when i update hpbar, i am getting player children and get first child. This is not comfortable.
What solution would you like?
Add functions for world:
Path will be like "EntityId or Name/EntityId or Name/...."
Example: