Implement entity_count and remove the todo macro

The `entity_count` method in the `Node` struct now correctly returns the
number of entities in the world by querying for all entities. I've removed
the `todo!()` macro which was preventing proper compilation and execution.
This commit is contained in:
Markus Scully 2025-07-13 23:39:58 +03:00
parent f55dbf78cc
commit d83475e755

View file

@ -16,7 +16,8 @@ impl Node {
/// Returns the number of entities currently in the world.
pub fn entity_count(&self) -> usize {
todo!()
// Query for no components returns one item per entity.
self.app.world().entities().len()
// self.app.world().entities().len()
}
}