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-04-11 20:13:07 +00:00
|
|
|
App::new()
|
2020-11-03 03:01:17 +00:00
|
|
|
.add_plugins(DefaultPlugins)
|
2021-09-14 06:14:19 +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>) {
|
2020-10-18 20:48:15 +00:00
|
|
|
let music = asset_server.load("sounds/Windless Slopes.mp3");
|
2020-10-20 18:44:50 +00:00
|
|
|
audio.play(music);
|
2020-07-16 20:46:51 +00:00
|
|
|
}
|