use asset server for impact atlas
This commit is contained in:
@@ -38,6 +38,12 @@ pub struct UIAssets {
|
||||
pub camera: Handle<Image>,
|
||||
}
|
||||
|
||||
#[derive(AssetCollection, Resource)]
|
||||
pub struct GameAssets {
|
||||
#[asset(path = "textures/fx/impact.png")]
|
||||
pub impact_atlas: Handle<Image>,
|
||||
}
|
||||
|
||||
pub struct LoadingPlugin;
|
||||
impl Plugin for LoadingPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
@@ -45,6 +51,7 @@ impl Plugin for LoadingPlugin {
|
||||
LoadingState::new(GameState::AssetLoading)
|
||||
.continue_to_state(GameState::MapLoading)
|
||||
.load_collection::<AudioAssets>()
|
||||
.load_collection::<GameAssets>()
|
||||
.load_collection::<UIAssets>(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user