diff options
author | HampusM <hampus@hampusmat.com> | 2024-11-11 00:11:22 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-11-11 00:11:22 +0100 |
commit | daf0bc236df25c0e9f44bc3e30839c16cda3f638 (patch) | |
tree | 7475e4e58686dd34366e641ec32f5a9374d66533 /ecs/src/archetype.rs | |
parent | 17f63d9859e1c82a30c07bf110cf2b9872e2427e (diff) |
refactor(ecs): use same ID for entities & components
Diffstat (limited to 'ecs/src/archetype.rs')
-rw-r--r-- | ecs/src/archetype.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/src/archetype.rs b/ecs/src/archetype.rs index 808d006..5c104b7 100644 --- a/ecs/src/archetype.rs +++ b/ecs/src/archetype.rs @@ -1,10 +1,10 @@ use std::hash::{DefaultHasher, Hash, Hasher}; use crate::component::{ - Id as ComponentId, IsOptional as ComponentIsOptional, Metadata as ComponentMetadata, }; +use crate::uid::Uid; /// Archetype ID. #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] @@ -33,7 +33,7 @@ impl Id } /// Returns the ID of a archetype with the given components. - fn new(component_ids: impl IntoIterator<Item = ComponentId>) -> Self + fn new(component_ids: impl IntoIterator<Item = Uid>) -> Self { let mut hasher = DefaultHasher::new(); |