pub fn build(self, app: &mut AppBuilder) {
        app.add_system_set(self.load)
            .add_system_set(self.check)
            .insert_resource(AssetLoaderConfiguration::<T> {
                count: self.collection_count,
                next: self.next,
            });
    }
/// Finish configuring the [AssetLoader]
///
/// Calling this function is required to set up the asset loading.
/// ```edition2018
/// # use bevy_asset_loader::{AssetLoader, AssetCollection};
/// # use bevy::prelude::*;
/// # use bevy::asset::AssetPlugin;
/// # fn main() {
///     let mut app = App::build();
///     AssetLoader::new(GameState::Loading, GameState::Menu)
///         .with_collection::<AudioAssets>()
///         .with_collection::<TextureAssets>()
///         .build(&mut app);
/// #   app
/// #       .add_state(GameState::Loading)
/// #       .add_plugins(MinimalPlugins)
/// #       .add_plugin(AssetPlugin::default())
/// #       .set_runner(|mut app| app.schedule.run(&mut app.world))
/// #       .run();
/// # }
/// # #[derive(Clone, Eq, PartialEq, Debug, Hash)]
/// # enum GameState {
/// #     Loading,
/// #     Menu
/// # }
/// # #[derive(AssetCollection)]
/// # pub struct AudioAssets {
/// #     #[asset(path = "audio/flying.ogg")]
/// #     pub flying: Handle<AudioSource>,
/// # }
/// # #[derive(AssetCollection)]
/// # pub struct TextureAssets {
/// #     #[asset(path = "textures/player.png")]
/// #     pub player: Handle<Texture>,
/// #     #[asset(path = "textures/tree.png")]
/// #     pub tree: Handle<Texture>,
/// # }
/// ```
Finish configuring the [AssetLoader]
Calling this function is required to set up the asset loading.
Finish configuring the [ AssetLoader ] Calling this function is required to set up the asset loading .
pub fn build(self, app: &mut AppBuilder) {
        app.add_system_set(self.load)
            .add_system_set(self.check)
            .insert_resource(AssetLoaderConfiguration::<T> {
                count: self.collection_count,
                next: self.next,
            });
    }
pub fn build ( self , app : & mut AppBuilder ) { app . add_system_set ( self . load ) . add_system_set ( self . check ) . insert_resource ( AssetLoaderConfiguration :: < T > { count : self . collection_count , next : self . next , } ) ; }
Finish configuring the [AssetLoader]
Calling this function is required to set up the asset loading.
Finish configuring the [ AssetLoader ] Calling this function is required to set up the asset loading .
self
app
&mut AppBuilder
self
app
&mut AppBuilder
use bevy_asset_loader::{assetloader, assetcollection};
None
use bevy::prelude::*;
None
use bevy::asset::assetplugin;
None
fn main() {
let mut app = App::build();
AssetLoader::new(GameState::Loading, GameState::Menu)
.with_collection::()
.with_collection::()
.build(&mut app).
let mut app = App :: build () ; AssetLoader :: new ( GameState :: Loading GameState :: Menu ) . with_collection :: () . with_collection :: () . build ( &mut app ) .
app
None
.add_state(gamestate::loading)
None
.add_plugins(minimalplugins)
None
.add_plugin(assetplugin::default())
None
.set_runner(|mut app| app.schedule.run(&mut app.world))
None
.run();
None
}
None
#[derive(clone, eq, partialeq, debug, hash)]
None
enum gamestate {
None
loading,
None
menu
None
}
None
#[derive(assetcollection)]
None
pub struct audioassets {
None
#[asset(path = "audio/flying.ogg")]
None
pub flying: handle<audiosource>,
None
}
None
#[derive(assetcollection)]
None
pub struct textureassets {
None
#[asset(path = "textures/player.png")]
None
pub player: handle<texture>,
None
#[asset(path = "textures/tree.png")]
None
pub tree: handle<texture>,
None
}
None