reduce volume, move buttons to the right
This commit is contained in:
+16
-1
@@ -1,4 +1,7 @@
|
||||
use macroquad::audio::Sound;
|
||||
use macroquad::audio::{self, Sound};
|
||||
use quad_snd::PlaySoundParams;
|
||||
|
||||
use super::constants::VOLUME;
|
||||
|
||||
pub struct Sounds {
|
||||
pub click: Sound,
|
||||
@@ -7,3 +10,15 @@ pub struct Sounds {
|
||||
pub button: Sound,
|
||||
pub mode: Sound,
|
||||
}
|
||||
|
||||
impl Sounds {
|
||||
pub fn play(sound: &Sound) {
|
||||
audio::play_sound(
|
||||
sound,
|
||||
PlaySoundParams {
|
||||
looped: false,
|
||||
volume: VOLUME,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user