Update a couple of deprecated bits

This commit is contained in:
Patrick Dobbs 2024-10-24 23:22:58 +01:00
parent ac406eaad7
commit c7b1ad3145
3 changed files with 4 additions and 10 deletions

View File

@ -514,11 +514,8 @@ pub(crate) fn blueprints_assets_loaded(
//println!("ANIMATION INFOS: {:?}", animation_infos); //println!("ANIMATION INFOS: {:?}", animation_infos);
commands.entity(entity).insert(( commands.entity(entity).insert((
SceneBundle { SceneRoot(scene.clone()),
scene: SceneRoot(scene.clone()), transforms,
transform: transforms,
..Default::default()
},
OriginalChildren(original_children), OriginalChildren(original_children),
BlueprintAnimations { BlueprintAnimations {
// TODO: perhaps swap this out with InstanceAnimations depending on whether we are spawning a level or a simple blueprint // TODO: perhaps swap this out with InstanceAnimations depending on whether we are spawning a level or a simple blueprint

View File

@ -83,10 +83,7 @@ pub(crate) fn load_game(
// let input = std::fs::read(&path)?; // let input = std::fs::read(&path)?;
let _dynamic_data = commands let _dynamic_data = commands
.spawn(( .spawn((
DynamicSceneBundle { DynamicSceneRoot(asset_server.load(load_request.path.clone())),
scene: DynamicSceneRoot(asset_server.load(load_request.path.clone())),
..default()
},
bevy::prelude::Name::from("World_dynamic"), bevy::prelude::Name::from("World_dynamic"),
DynamicEntitiesRoot, DynamicEntitiesRoot,
GameWorldTag, GameWorldTag,

View File

@ -86,7 +86,7 @@ pub(crate) fn save_game(world: &mut World) {
let mut save_path: String = "".into(); let mut save_path: String = "".into();
let mut events = world.resource_mut::<Events<SavingRequest>>(); let mut events = world.resource_mut::<Events<SavingRequest>>();
for event in events.get_reader().read(&events) { for event in events.get_cursor().read(&events) {
info!("SAVE EVENT !! {:?}", event); info!("SAVE EVENT !! {:?}", event);
save_path.clone_from(&event.path); save_path.clone_from(&event.path);
} }