summaryrefslogtreecommitdiff
path: root/engine-ecs/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-11-02 03:01:00 +0100
committerHampusM <hampus@hampusmat.com>2026-11-02 03:01:00 +0100
commit5f4118d38783c01d35ca0907d07edb7af30e2fbc (patch)
treeb00be7b024097608d6db111752e16f33991573ff /engine-ecs/src/lib.rs
parent5c8096e2af94601c0d3c00c29f8fb4616c0a08d6 (diff)
feat(engine-ecs): rename system::SystemComponent to Function and make it public
Diffstat (limited to 'engine-ecs/src/lib.rs')
-rw-r--r--engine-ecs/src/lib.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine-ecs/src/lib.rs b/engine-ecs/src/lib.rs
index 188ca7a..da221cb 100644
--- a/engine-ecs/src/lib.rs
+++ b/engine-ecs/src/lib.rs
@@ -60,10 +60,10 @@ use crate::sole::{Single, Sole};
use crate::system::observer::Observer;
use crate::system::{
Callbacks,
+ Function as SystemFunction,
Metadata as SystemMetadata,
Param as SystemParam,
System,
- SystemComponent,
};
use crate::uid::Uid;
@@ -272,7 +272,7 @@ impl World
self.create_ent(
ent_id,
- [SystemComponent { system }.into_parts()].into_iter().chain(
+ [SystemFunction { system }.into_parts()].into_iter().chain(
ObserverT::observed_events()
.into_iter()
.map(IntoComponentParts::into_parts),
@@ -291,7 +291,7 @@ impl World
{
let (type_erased_system, mut system_callbacks) = system.finish();
- let system_ent_id = self.spawn((SystemComponent { system: type_erased_system },));
+ let system_ent_id = self.spawn((SystemFunction { system: type_erased_system },));
system_callbacks.on_created(self, SystemMetadata { ent_id: system_ent_id });
@@ -491,7 +491,7 @@ impl World
.into_iter()
.filter_map(|phase_has_system| phase_has_system.get_target_ent())
{
- let Some(system) = system_entity.get::<SystemComponent>() else {
+ let Some(system) = system_entity.get::<SystemFunction>() else {
cold_path();
continue;
};
@@ -895,10 +895,10 @@ impl World
{
assert!(event_id.is_pair());
- let query = Query::<(&SystemComponent,)>::from_flexible_query(
+ let query = Query::<(&SystemFunction,)>::from_flexible_query(
self.flexible_query(
QueryTerms::<QUERY_MAX_TERM_CNT>::builder()
- .present([SystemComponent::id(), event_id])
+ .present([SystemFunction::id(), event_id])
.build(),
),
);