mirror of
https://github.com/lisk77/comet.git
synced 2025-10-24 13:58:49 +00:00
feat: implemented a Camera2D component that works with the Renderer2D
Renders with only one camera (the first by ID) rn but should work
This commit is contained in:
parent
e6df3dba91
commit
8b439cb0e8
4 changed files with 178 additions and 45 deletions
|
|
@ -204,9 +204,9 @@ impl World {
|
|||
}
|
||||
|
||||
/// Returns a list of entities that have the given components.
|
||||
pub fn get_entities_with(&self, components: ComponentSet) -> Vec<u32> {
|
||||
pub fn get_entities_with(&self, components: ComponentSet) -> Vec<usize> {
|
||||
if self.archetypes.contains_archetype(&components) {
|
||||
return self.archetypes.get_archetype(&components).unwrap().clone();
|
||||
return self.archetypes.get_archetype(&components).unwrap().clone().iter().map(|x| *x as usize).collect();
|
||||
}
|
||||
error!("The given components {:?} are not registered in the world!", components);
|
||||
Vec::new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue