mirror of
https://github.com/lisk77/comet.git
synced 2025-10-24 13:58:49 +00:00
fix: the ecs will now create all the archetypes for any combination of components that entities have on them
This commit is contained in:
parent
7d351ced62
commit
c1d41323f9
4 changed files with 55 additions and 12 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue