mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Add cave music
This commit is contained in:
parent
0a345aae5e
commit
9e9f44b5e5
4 changed files with 41 additions and 8 deletions
|
|
@ -2,14 +2,16 @@ use sfml::{audio::Music, graphics::Texture, SfBox};
|
|||
|
||||
pub struct Res {
|
||||
pub tile_atlas: SfBox<Texture>,
|
||||
pub music: Music<'static>,
|
||||
pub surf_music: Music<'static>,
|
||||
pub und_music: Music<'static>,
|
||||
}
|
||||
|
||||
impl Res {
|
||||
pub fn load() -> anyhow::Result<Self> {
|
||||
Ok(Self {
|
||||
tile_atlas: Texture::from_file("res/tiles.png")?,
|
||||
music: Music::from_file("res/music.ogg").unwrap(),
|
||||
surf_music: Music::from_file("res/music.ogg").unwrap(),
|
||||
und_music: Music::from_file("res/cave.ogg").unwrap(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue