2020-04-06 03:19:02 +00:00
|
|
|
pub mod bytes;
|
|
|
|
pub mod time;
|
|
|
|
|
2020-04-06 09:00:00 +00:00
|
|
|
use bevy_app::{stage, AppBuilder, AppPlugin};
|
2020-04-06 03:19:02 +00:00
|
|
|
use bevy_transform::transform_system_bundle;
|
|
|
|
use time::{start_timer_system, stop_timer_system};
|
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
pub struct CorePlugin;
|
|
|
|
|
|
|
|
impl AppPlugin for CorePlugin {
|
|
|
|
fn build(&self, app: &mut AppBuilder) {
|
|
|
|
for transform_system in transform_system_bundle::build(app.world_mut()).drain(..) {
|
|
|
|
app.add_system(transform_system);
|
|
|
|
}
|
|
|
|
|
|
|
|
app.add_resource(time::Time::new())
|
2020-04-06 09:00:00 +00:00
|
|
|
.add_system_to_stage(stage::FIRST, start_timer_system())
|
|
|
|
.add_system_to_stage(stage::LAST, stop_timer_system());
|
2020-04-06 03:19:02 +00:00
|
|
|
}
|
|
|
|
}
|