summaryrefslogtreecommitdiff
path: root/ecs/src/phase.rs
blob: 39f2a08562bb686bcf19044ad9a23a9f4541dec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use ecs_macros::Component;

use crate::{declare_entity, World};

#[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);
}