Play background sound #19

Merged
msrd0 merged 3 commits from play-sound into main 2024-07-07 16:13:39 +00:00
Showing only changes of commit fd01ccb4df - Show all commits

View file

@ -128,7 +128,11 @@ impl AssetsWriter {
writeln!(file, "{indent}\t\t_ctx.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?;
}
for asset_const_name in root.sound_assets.values() {
writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name}, Default::default());")?;
writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name},")?;
writeln!(
file,
"{indent}\t\t\tcomfy::StaticSoundSettings::new().loop_region(..));"
)?;
}
for group_name in root.groups.keys() {
writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?;