Files
sol_chess/src/game/sound.rs
T
2026-01-15 22:29:38 +05:30

25 lines
450 B
Rust

use macroquad::audio::{self, Sound};
use quad_snd::PlaySoundParams;
use super::constants::VOLUME;
pub struct Sounds {
pub click: Sound,
pub win: Sound,
pub loss: Sound,
pub button: Sound,
pub mode: Sound,
}
impl Sounds {
pub fn play(sound: &Sound) {
audio::play_sound(
sound,
PlaySoundParams {
looped: false,
volume: VOLUME,
},
);
}
}