summaryrefslogtreecommitdiff
path: root/engine-ecs/src/phase.rs
blob: 976de1b220b932ae9c9200d4b23923fa633a1891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;