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() {
|
|
|
|
App::build()
|
2020-11-03 03:01:17 +00:00
|
|
|
.add_plugins(DefaultPlugins)
|
2020-12-16 05:57:16 +00:00
|
|
|
.add_startup_system(setup.system())
|
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
|
|
|
}
|