From 69d90ece7f54996f0f51fc120a38d37717c5248e Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 8 Jun 2024 20:47:35 +0200 Subject: perf(ecs): store components using archetypes --- ecs/src/system/stateful.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ecs/src/system') diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index 6c0b554..b765ff0 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -85,6 +85,13 @@ macro_rules! impl_system { self } + fn prepare(&self, world_data: &WorldData) + { + #( + TParam~I::handle_pre_run(world_data); + )* + } + fn run<'this>(&'this self, world_data: &'world WorldData) where 'this: 'world -- cgit v1.2.3-18-g5258