Open
Description
As game codebases scale, I begin to find this extremely noisy and hard to read:
// e is an EntityId
entity::get_component(e, component());
entity::despawn_recursive(e);
entity::add_child(e, child);
I think that a much more readable (and idiomatic if you're looking at Ambient packages as objects) alternative is this:
// e is an EntityId
e.get(component());
e.despawn_recursive();
e.add_child(child);
This would apply for all other functions on EntityId
in the entity
module such as has_component()
.