mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 12:25:02 +01:00
Add music
This commit is contained in:
parent
20409e3ee2
commit
69b022ea02
3 changed files with 6 additions and 2 deletions
|
|
@ -1,13 +1,15 @@
|
|||
use sfml::{graphics::Texture, SfBox};
|
||||
use sfml::{audio::Music, graphics::Texture, SfBox};
|
||||
|
||||
pub struct Res {
|
||||
pub tile_atlas: SfBox<Texture>,
|
||||
pub 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(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue