summaryrefslogtreecommitdiff
path: root/ecs/src/phase.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/phase.rs')
-rw-r--r--ecs/src/phase.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/ecs/src/phase.rs b/ecs/src/phase.rs
index 9f47fb8..c13c432 100644
--- a/ecs/src/phase.rs
+++ b/ecs/src/phase.rs
@@ -1,13 +1,19 @@
use ecs_macros::Component;
use crate::pair::{ChildOf, Pair};
-use crate::static_entity;
+use crate::{declare_entity, World};
#[derive(Debug, Default, Clone, Copy, Component)]
pub struct Phase;
-static_entity!(pub START, (Phase,));
+declare_entity!(pub START, (Phase,));
+declare_entity!(pub PRE_UPDATE, (Phase,));
+declare_entity!(pub UPDATE, (Phase, Pair::new::<ChildOf>(*PRE_UPDATE)));
-static_entity!(pub PRE_UPDATE, (Phase,));
-
-static_entity!(pub UPDATE, (Phase, Pair::new::<ChildOf>(*PRE_UPDATE)));
+#[doc(hidden)]
+pub(crate) fn spawn_entities(world: &mut World)
+{
+ world.create_declared_entity(&START);
+ world.create_declared_entity(&PRE_UPDATE);
+ world.create_declared_entity(&UPDATE);
+}