forked from 2ndbeam/evolution-rs
Asset preload structures and their impls
This commit is contained in:
parent
367359e47f
commit
1cdd4efd78
5 changed files with 125 additions and 5 deletions
14
src/plugins/asset_preloader.rs
Normal file
14
src/plugins/asset_preloader.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use bevy::prelude::*;
|
||||
use crate::asset_preloader::*;
|
||||
|
||||
pub struct AssetPreloadPlugin;
|
||||
|
||||
impl Plugin for AssetPreloadPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
//app.init_resource::<AssetPreloadChecker<Image>>();
|
||||
let mut preload = AssetPreload::new();
|
||||
let image: AssetPreloadChecker<Image> = AssetPreloadChecker::build(&mut preload).finish();
|
||||
|
||||
app.insert_resource(image);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue