diff options
author | HampusM <hampus@hampusmat.com> | 2024-07-29 12:56:36 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-07-29 12:56:36 +0200 |
commit | 0bc0eeb94b9e5b4600dc84f8e2fcf686a58921df (patch) | |
tree | 68bd95814775ded637d7140f69a25da90bca6a17 /ecs | |
parent | 4313b5b0bfa79f4eaed25b65c5a7154c16074208 (diff) |
refactor(ecs): rename system::Param handle_pre_run fn to prepare
Diffstat (limited to 'ecs')
-rw-r--r-- | ecs/src/query.rs | 2 | ||||
-rw-r--r-- | ecs/src/system.rs | 4 | ||||
-rw-r--r-- | ecs/src/system/stateful.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ecs/src/query.rs b/ecs/src/query.rs index 6b06e9a..2c52206 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -127,7 +127,7 @@ where Box::new(QueryComponentIds { component_ids: Comps::ids() }) } - fn handle_pre_run(world_data: &WorldData) + fn prepare(world_data: &WorldData) { let mut component_storage_lock = world_data .component_storage diff --git a/ecs/src/system.rs b/ecs/src/system.rs index aaf09fb..ba5ac96 100644 --- a/ecs/src/system.rs +++ b/ecs/src/system.rs @@ -61,7 +61,7 @@ macro_rules! impl_system { fn prepare(&self, world_data: &WorldData) { #( - TParam~I::handle_pre_run(world_data); + TParam~I::prepare(world_data); )* } @@ -217,7 +217,7 @@ pub unsafe trait Param<'world> fn get_comparable() -> Box<dyn Any>; - fn handle_pre_run(_world_data: &WorldData) {} + fn prepare(_world_data: &WorldData) {} } pub struct NoInitParamFlag {} diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index 26ceaaa..dd0c5e1 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -88,7 +88,7 @@ macro_rules! impl_system { fn prepare(&self, world_data: &WorldData) { #( - TParam~I::handle_pre_run(world_data); + TParam~I::prepare(world_data); )* } |