replace appbuilder::new() with app::build()

This commit is contained in:
Carter Anderson 2020-03-20 16:35:19 -07:00
parent 43e69484ba
commit cbba656f16
15 changed files with 15 additions and 15 deletions

View file

@ -10,7 +10,7 @@ struct MyMaterial {
}
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.setup_render_graph(|builder, pipeline_storage, shader_storage| {
builder

View file

@ -1,5 +1,5 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new().run();
App::build().run();
}

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new().add_defaults().setup_world(setup).run();
App::build().add_defaults().setup_world(setup).run();
}
#[allow(dead_code)]

View file

@ -2,7 +2,7 @@ use bevy::prelude::*;
use rand::{rngs::StdRng, Rng, SeedableRng};
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.add_system(build_move_system())
.add_system(bevy::diagnostics::build_fps_printer_system())

View file

@ -19,7 +19,7 @@ struct Wander {
}
fn main() {
AppBuilder::new()
App::build()
.setup_world(setup)
.add_system(build_wander_system())
.add_system(build_navigate_system())

View file

@ -2,5 +2,5 @@ use bevy::{asset, prelude::*};
fn main() {
asset::load_gltf("examples/assets/Box.gltf").unwrap();
AppBuilder::new().add_defaults().run();
App::build().add_defaults().run();
}

View file

@ -3,7 +3,7 @@ use bevy::prelude::*;
struct Rotator;
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.setup_world(setup)
.add_system(build_rotator_system())

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.load_plugin(concat!(
env!("CARGO_MANIFEST_DIR"),

View file

@ -2,7 +2,7 @@ use bevy::{prelude::*, serialization::*};
use serde::{Deserialize, Serialize};
use type_uuid::TypeUuid;
fn main() {
let app = AppBuilder::new().add_defaults().setup_world(setup).build();
let app = App::build().add_defaults().setup_world(setup).build();
let comp_registrations = [ComponentRegistration::of::<Test>()];

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new().add_defaults().setup_world(setup).run();
App::build().add_defaults().setup_world(setup).run();
}
fn setup(world: &mut World, resources: &mut Resources) {

View file

@ -2,7 +2,7 @@ use bevy::prelude::*;
use rand::{rngs::StdRng, Rng, SeedableRng};
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.add_system(build_move_system())
.add_system(bevy::diagnostics::build_fps_printer_system())

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new().add_defaults().setup_world(setup).run();
App::build().add_defaults().setup_world(setup).run();
}
fn setup(world: &mut World, resources: &mut Resources) {

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new().add_defaults().setup_world(setup).run();
App::build().add_defaults().setup_world(setup).run();
}
fn setup(world: &mut World, resources: &mut Resources) {

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
fn main() {
AppBuilder::new()
App::build()
.add_defaults()
.setup_world(setup)
.add_system(build_move_system())

View file

@ -16,6 +16,7 @@ pub struct BindGroupInfo {
}
pub struct WgpuResources {
pub render_resources: RenderResources,
pub buffers: HashMap<RenderResource, wgpu::Buffer>,
pub textures: HashMap<RenderResource, wgpu::TextureView>,
pub samplers: HashMap<RenderResource, wgpu::Sampler>,
@ -24,7 +25,6 @@ pub struct WgpuResources {
pub bind_group_layouts: HashMap<u64, wgpu::BindGroupLayout>,
pub entity_bind_groups: HashMap<(Entity, u64), BindGroupInfo>,
pub dynamic_uniform_buffer_info: HashMap<RenderResource, DynamicUniformBufferInfo>,
pub render_resources: RenderResources,
}
impl WgpuResources {