use asset server for impact atlas

This commit is contained in:
2025-03-26 08:16:54 +01:00
parent ac87da83d8
commit 7dd9999860
2 changed files with 10 additions and 8 deletions

View File

@@ -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>(),
);
}