mirror of
https://github.com/bevyengine/bevy
synced 2024-11-28 23:50:20 +00:00
rename default_stage to stage
This commit is contained in:
parent
683a70d8e7
commit
016bf2152c
5 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
default_stage,
|
stage,
|
||||||
plugin::{load_plugin, AppPlugin},
|
plugin::{load_plugin, AppPlugin},
|
||||||
schedule_plan::SchedulePlan,
|
schedule_plan::SchedulePlan,
|
||||||
App, Events,
|
App, Events,
|
||||||
|
@ -119,7 +119,7 @@ impl AppBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_system(&mut self, system: Box<dyn Schedulable>) -> &mut Self {
|
pub fn add_system(&mut self, system: Box<dyn Schedulable>) -> &mut Self {
|
||||||
self.add_system_to_stage(default_stage::UPDATE, system)
|
self.add_system_to_stage(stage::UPDATE, system)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_startup_system_to_stage(
|
pub fn add_startup_system_to_stage(
|
||||||
|
@ -134,16 +134,16 @@ impl AppBuilder {
|
||||||
|
|
||||||
pub fn add_startup_system(&mut self, system: Box<dyn Schedulable>) -> &mut Self {
|
pub fn add_startup_system(&mut self, system: Box<dyn Schedulable>) -> &mut Self {
|
||||||
self.startup_schedule_plan
|
self.startup_schedule_plan
|
||||||
.add_system_to_stage(default_stage::STARTUP, system);
|
.add_system_to_stage(stage::STARTUP, system);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_default_stages(&mut self) -> &mut Self {
|
pub fn add_default_stages(&mut self) -> &mut Self {
|
||||||
self.add_startup_stage(default_stage::STARTUP)
|
self.add_startup_stage(stage::STARTUP)
|
||||||
.add_stage(default_stage::FIRST)
|
.add_stage(stage::FIRST)
|
||||||
.add_stage(default_stage::EVENT_UPDATE)
|
.add_stage(stage::EVENT_UPDATE)
|
||||||
.add_stage(default_stage::UPDATE)
|
.add_stage(stage::UPDATE)
|
||||||
.add_stage(default_stage::LAST)
|
.add_stage(stage::LAST)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build_system<F>(&mut self, build: F) -> &mut Self
|
pub fn build_system<F>(&mut self, build: F) -> &mut Self
|
||||||
|
@ -189,7 +189,7 @@ impl AppBuilder {
|
||||||
{
|
{
|
||||||
self.add_resource(Events::<T>::default())
|
self.add_resource(Events::<T>::default())
|
||||||
.add_system_to_stage(
|
.add_system_to_stage(
|
||||||
default_stage::EVENT_UPDATE,
|
stage::EVENT_UPDATE,
|
||||||
Events::<T>::build_update_system(),
|
Events::<T>::build_update_system(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ mod event;
|
||||||
mod plugin;
|
mod plugin;
|
||||||
pub mod schedule_plan;
|
pub mod schedule_plan;
|
||||||
pub mod schedule_runner;
|
pub mod schedule_runner;
|
||||||
pub mod default_stage;
|
pub mod stage;
|
||||||
|
|
||||||
pub use app::*;
|
pub use app::*;
|
||||||
pub use app_builder::*;
|
pub use app_builder::*;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pub mod bytes;
|
pub mod bytes;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
|
||||||
use bevy_app::{default_stage, AppBuilder, AppPlugin};
|
use bevy_app::{stage, AppBuilder, AppPlugin};
|
||||||
use bevy_transform::transform_system_bundle;
|
use bevy_transform::transform_system_bundle;
|
||||||
use time::{start_timer_system, stop_timer_system};
|
use time::{start_timer_system, stop_timer_system};
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ impl AppPlugin for CorePlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.add_resource(time::Time::new())
|
app.add_resource(time::Time::new())
|
||||||
.add_system_to_stage(default_stage::FIRST, start_timer_system())
|
.add_system_to_stage(stage::FIRST, start_timer_system())
|
||||||
.add_system_to_stage(default_stage::LAST, stop_timer_system());
|
.add_system_to_stage(stage::LAST, stop_timer_system());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ use self::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy_app::{AppBuilder, AppPlugin, GetEventReader, default_stage};
|
use bevy_app::{AppBuilder, AppPlugin, GetEventReader, stage};
|
||||||
use bevy_transform::prelude::LocalToWorld;
|
use bevy_transform::prelude::LocalToWorld;
|
||||||
use bevy_asset::AssetStorage;
|
use bevy_asset::AssetStorage;
|
||||||
use bevy_window::WindowResized;
|
use bevy_window::WindowResized;
|
||||||
|
@ -96,7 +96,7 @@ impl AppPlugin for RenderPlugin {
|
||||||
asset_batchers.batch_types2::<Mesh, StandardMaterial>();
|
asset_batchers.batch_types2::<Mesh, StandardMaterial>();
|
||||||
app
|
app
|
||||||
.add_system(build_entity_render_resource_assignments_system())
|
.add_system(build_entity_render_resource_assignments_system())
|
||||||
.add_stage_after(default_stage::UPDATE, RENDER_STAGE)
|
.add_stage_after(stage::UPDATE, RENDER_STAGE)
|
||||||
.add_resource(RenderGraph::default())
|
.add_resource(RenderGraph::default())
|
||||||
.add_resource(AssetStorage::<Mesh>::new())
|
.add_resource(AssetStorage::<Mesh>::new())
|
||||||
.add_resource(AssetStorage::<Texture>::new())
|
.add_resource(AssetStorage::<Texture>::new())
|
||||||
|
|
Loading…
Reference in a new issue