use different head drop meshes

This commit is contained in:
2025-06-06 10:15:45 +02:00
parent 67320b3be4
commit 6e8e995da5
4 changed files with 66 additions and 38 deletions

View File

@@ -67,6 +67,12 @@ struct HeadsAssets {
heads: Handle<HeadDatabaseAsset>,
}
#[derive(AssetCollection, Resource)]
pub struct HeadDropAssets {
#[asset(path = "models/head_drops", collection(mapped, typed))]
pub meshes: HashMap<AssetFileName, Handle<Gltf>>,
}
#[derive(AssetCollection, Resource)]
pub struct UIAssets {
#[asset(path = "font.ttf")]
@@ -93,9 +99,6 @@ pub struct GameAssets {
#[asset(path = "models/key.glb#Scene0")]
pub mesh_key: Handle<Scene>,
#[asset(path = "models/head_drop.glb#Scene0")]
pub mesh_head_drop: Handle<Scene>,
#[asset(path = "models/spawn.glb#Scene0")]
pub mesh_spawn: Handle<Scene>,
@@ -122,6 +125,7 @@ impl Plugin for LoadingPlugin {
.load_collection::<AudioAssets>()
.load_collection::<GameAssets>()
.load_collection::<HeadsAssets>()
.load_collection::<HeadDropAssets>()
.load_collection::<UIAssets>(),
);
}