mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
20 lines
480 B
Rust
20 lines
480 B
Rust
use sfml::audio::Music;
|
|
|
|
use crate::texture_atlas::AtlasBundle;
|
|
|
|
#[derive(Debug)]
|
|
pub struct Res {
|
|
pub atlas: AtlasBundle,
|
|
pub surf_music: Music<'static>,
|
|
pub und_music: Music<'static>,
|
|
}
|
|
|
|
impl Res {
|
|
pub fn load() -> anyhow::Result<Self> {
|
|
Ok(Self {
|
|
atlas: AtlasBundle::new()?,
|
|
surf_music: Music::from_file("res/music/music.ogg").unwrap(),
|
|
und_music: Music::from_file("res/music/cave2.ogg").unwrap(),
|
|
})
|
|
}
|
|
}
|