summaryrefslogtreecommitdiff
path: root/ecs/src/component/storage
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-09-10 15:35:26 +0200
committerHampusM <hampus@hampusmat.com>2025-09-10 15:35:26 +0200
commitce1bade2c21cc3129fa8bc2b4bc67bc4dc2c25c3 (patch)
treeb1c947e7736b69b4fbf16521bc9705450525f61c /ecs/src/component/storage
parentf5ee3b13a45b58b482a48c97ea6e67b587f1cc52 (diff)
refactor(ecs): remove component added & removed events
Diffstat (limited to 'ecs/src/component/storage')
-rw-r--r--ecs/src/component/storage/archetype.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/ecs/src/component/storage/archetype.rs b/ecs/src/component/storage/archetype.rs
index 788794a..d96632e 100644
--- a/ecs/src/component/storage/archetype.rs
+++ b/ecs/src/component/storage/archetype.rs
@@ -314,29 +314,18 @@ impl Entity
#[derive(Debug)]
pub struct EntityComponent
{
- id: Uid,
component: Lock<Box<dyn Any>>,
}
impl EntityComponent
{
- pub fn new(
- component: Box<dyn Any>,
- component_id: Uid,
- component_name: &'static str,
- ) -> Self
+ pub fn new(component: Box<dyn Any>, component_name: &'static str) -> Self
{
Self {
- id: component_id,
component: Lock::new(component, component_name),
}
}
- pub fn id(&self) -> Uid
- {
- self.id
- }
-
pub fn component(&self) -> &Lock<Box<dyn Any>>
{
&self.component