diff options
| author | HampusM <hampus@hampusmat.com> | 2026-05-21 17:55:20 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-05-21 17:55:20 +0200 |
| commit | 8022e8998290b067b8aa0cb9cba8ba410826bdab (patch) | |
| tree | 7171e79ce530e03079046ee8fd12167160c45480 /engine-ecs/src/phase.rs | |
| parent | 412cee02c252f91bcf0b70a3f5cc5fca6d2b4c62 (diff) | |
Diffstat (limited to 'engine-ecs/src/phase.rs')
| -rw-r--r-- | engine-ecs/src/phase.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine-ecs/src/phase.rs b/engine-ecs/src/phase.rs new file mode 100644 index 0000000..976de1b --- /dev/null +++ b/engine-ecs/src/phase.rs @@ -0,0 +1,20 @@ +use crate::{Component, World, declare_entity}; + +#[derive(Debug, Default, Clone, Copy, Component)] +pub struct Phase; + +declare_entity!(pub START, (Phase,)); +declare_entity!(pub PRE_UPDATE, (Phase,)); +declare_entity!(pub UPDATE, (Phase,)); +declare_entity!(pub POST_UPDATE, (Phase,)); + +pub(crate) fn spawn_entities(world: &mut World) +{ + world.create_declared_entity(&START); + world.create_declared_entity(&PRE_UPDATE); + world.create_declared_entity(&UPDATE); + world.create_declared_entity(&POST_UPDATE); +} + +#[derive(Debug, Component)] +pub(crate) struct HasSystem; |
