fix: the ecs will now create all the archetypes for any combination of components that entities have on them

This commit is contained in:
lisk77 2025-05-05 13:27:49 +02:00
parent 7d351ced62
commit c1d41323f9
4 changed files with 55 additions and 12 deletions

View file

@ -8,11 +8,9 @@ pub struct Entity {
impl Entity {
pub(crate) fn new(id: u32) -> Self {
let mut components = BitSet::new();
components.insert(0);
Self {
id,
components
components: BitSet::new()
}
}
@ -31,4 +29,4 @@ impl Entity {
pub(crate) fn get_components(&self) -> &BitSet {
&self.components
}
}
}