2020-02-22 23:01:11 +00:00
|
|
|
#![feature(specialization)]
|
2020-03-27 22:03:47 +00:00
|
|
|
pub mod diagnostic;
|
2020-02-08 07:17:51 +00:00
|
|
|
pub mod ecs;
|
2020-01-14 03:20:58 +00:00
|
|
|
pub mod prelude;
|
2020-01-15 06:19:28 +00:00
|
|
|
pub mod serialization;
|
2020-01-15 06:23:00 +00:00
|
|
|
pub mod ui;
|
2019-11-13 03:36:02 +00:00
|
|
|
|
2020-02-08 07:17:51 +00:00
|
|
|
pub use bevy_transform as transform;
|
2020-04-06 03:19:02 +00:00
|
|
|
pub use bevy_core as core;
|
|
|
|
pub use bevy_asset as asset;
|
|
|
|
pub use bevy_render as render;
|
|
|
|
pub use bevy_app as app;
|
|
|
|
pub use bevy_window as window;
|
|
|
|
pub use bevy_input as input;
|
|
|
|
|
2020-01-11 10:11:27 +00:00
|
|
|
pub use glam as math;
|
2020-03-18 01:25:27 +00:00
|
|
|
pub use legion;
|
2020-03-22 10:06:47 +00:00
|
|
|
pub use once_cell;
|
2020-04-06 03:19:02 +00:00
|
|
|
|
|
|
|
use app::AppBuilder;
|
|
|
|
|
|
|
|
pub trait AddDefaultPlugins {
|
|
|
|
fn add_default_plugins(&mut self) -> &mut Self;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl AddDefaultPlugins for AppBuilder {
|
|
|
|
fn add_default_plugins(&mut self) -> &mut Self {
|
|
|
|
self
|
|
|
|
.add_plugin(bevy_core::CorePlugin::default())
|
|
|
|
.add_plugin(bevy_input::InputPlugin::default())
|
|
|
|
.add_plugin(bevy_window::WindowPlugin::default())
|
|
|
|
.add_plugin(bevy_render::RenderPlugin::default())
|
|
|
|
.add_plugin(ui::UiPlugin::default());
|
|
|
|
|
|
|
|
#[cfg(feature = "bevy_winit")]
|
|
|
|
{
|
|
|
|
self.add_plugin(bevy_winit::WinitPlugin::default());
|
|
|
|
}
|
|
|
|
#[cfg(not(feature = "bevy_winit"))]
|
|
|
|
{
|
|
|
|
self.add_plugin(bevy_app::schedule_run::ScheduleRunner::default());
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "bevy_wgpu")]
|
|
|
|
{
|
|
|
|
self.add_plugin(
|
|
|
|
bevy_wgpu::WgpuRendererPlugin::default(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|