2020-07-16 20:46:51 +00:00
|
|
|
use bevy::prelude::*;
|
|
|
|
|
2020-07-28 20:43:07 +00:00
|
|
|
/// This example illustrates how to load and play an audio file
|
2020-07-16 20:46:51 +00:00
|
|
|
fn main() {
|
2021-07-27 20:21:06 +00:00
|
|
|
App::new()
|
2020-11-03 03:01:17 +00:00
|
|
|
.add_plugins(DefaultPlugins)
|
2021-07-27 23:42:36 +00:00
|
|
|
.add_startup_system(setup)
|
2020-07-16 20:46:51 +00:00
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
2020-10-20 18:44:50 +00:00
|
|
|
fn setup(asset_server: Res<AssetServer>, audio: Res<Audio>) {
|
2021-12-23 19:19:15 +00:00
|
|
|
let music = asset_server.load("sounds/Windless Slopes.ogg");
|
2020-10-20 18:44:50 +00:00
|
|
|
audio.play(music);
|
2020-07-16 20:46:51 +00:00
|
|
|
}
|