mirror of
https://github.com/lisk77/comet.git
synced 2025-10-27 23:28:49 +00:00
feat: added the beginnings of a ecs based camera system. render_scene_2d crashes miserably right now but theoretically everything *should* be in place for a full adoption
This commit is contained in:
parent
a9a8d076ca
commit
4ce24b58dd
5 changed files with 128 additions and 33 deletions
|
|
@ -200,7 +200,10 @@ impl World {
|
|||
|
||||
/// Returns a list of entities that have the given components.
|
||||
pub fn get_entities_with(&self, components: ComponentSet) -> Vec<u32> {
|
||||
assert!(self.archetypes.contains_archetype(&components), "The given components {:?} are not registered in the world!", components);
|
||||
self.archetypes.get_archetype(&components).unwrap().clone()
|
||||
//assert!(self.archetypes.contains_archetype(&components), "The given components {:?} are not registered in the world!", components);
|
||||
if self.archetypes.contains_archetype(&components) {
|
||||
return self.archetypes.get_archetype(&components).unwrap().clone();
|
||||
}
|
||||
Vec::new()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue