mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
replace appbuilder::new() with app::build()
This commit is contained in:
parent
43e69484ba
commit
cbba656f16
15 changed files with 15 additions and 15 deletions
|
@ -10,7 +10,7 @@ struct MyMaterial {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
AppBuilder::new()
|
||||
App::build()
|
||||
.add_defaults()
|
||||
.setup_render_graph(|builder, pipeline_storage, shader_storage| {
|
||||
builder
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
fn main() {
|
||||
AppBuilder::new().run();
|
||||
App::build().run();
|
||||
}
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
fn main() {
|
||||
AppBuilder::new()
|
||||
App::build()
|
||||
.add_defaults()
|
||||
.load_plugin(concat!(
|
||||
env!("CARGO_MANIFEST_DIR"),
|
||||
|
|
|
@ -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>()];
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
fn main() {
|
||||
AppBuilder::new()
|
||||
App::build()
|
||||
.add_defaults()
|
||||
.setup_world(setup)
|
||||
.add_system(build_move_system())
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue