Skip to content
Snippets Groups Projects
Commit 7e20aa93 authored by radow's avatar radow
Browse files

sounds

parent 8e4d175b
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
......@@ -3,12 +3,18 @@ use tetra::audio::Sound;
pub struct Sounds {
pub music: Sound,
pub hit: Sound,
pub fanfare: Sound,
pub gameover: Sound,
}
impl Sounds {
pub fn init() -> tetra::Result<Sounds> {
Ok(Sounds {
music: Sound::new("./resources/music.mp3")?,
hit: Sound::new("./resources/hit.wav")?,
fanfare: Sound::new("./resources/fanfare.wav")?,
gameover: Sound::new("./resources/gameover.wav")?,
})
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment