Added volume to music, response is slow

This commit is contained in:
2023-07-23 22:40:36 +10:00
parent dee5bea96d
commit 497dcf1774
3 changed files with 15 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ fn onFree(node: opaque) {
//debugging
fn onKeyDown(node: opaque, event: string) {
//test the music
if (event == "trigger_music") {
if (event == "music_toggle") {
if (checkMusicPaused() == false) {
pauseMusic();
}
@@ -71,6 +71,16 @@ fn onKeyDown(node: opaque, event: string) {
unpauseMusic();
}
}
if (event == "music_up") {
setMusicVolume(getMusicVolume() + 16);
}
if (event == "music_down") {
setMusicVolume(getMusicVolume() - 16);
}
print getMusicVolume();
}