house
This commit is contained in:
@@ -3,17 +3,15 @@ use bevy::prelude::*;
|
||||
use crate::{asset_loading::GltfAssets, GameState};
|
||||
|
||||
pub fn map_plugin(app: &mut App) {
|
||||
// app.add_systems(OnEnter(GameState::Playing), spawn_level);
|
||||
app.add_systems(OnEnter(GameState::Playing), spawn_level);
|
||||
}
|
||||
|
||||
fn spawn_level(
|
||||
mut commands: Commands,
|
||||
models: Res<Assets<Gltf>>,
|
||||
gltf_assets: Res<GltfAssets>) {
|
||||
gltf_assets: Res<GltfAssets>
|
||||
) {
|
||||
let gltf = models.get(&gltf_assets.wall).unwrap();
|
||||
|
||||
// commands.spawn(SceneBundle {
|
||||
// scene: gltf.scenes[0].clone(),
|
||||
// ..default()
|
||||
// });
|
||||
commands.spawn(SceneRoot(gltf.scenes[0].clone()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user