mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 20:22:27 +02:00
use injector restart in airGuitar script
This commit is contained in:
parent
5f4e3528c2
commit
70e085009b
1 changed files with 9 additions and 4 deletions
|
@ -138,10 +138,15 @@ function playChord(position, volume) {
|
|||
}
|
||||
|
||||
print("Played sound: " + whichChord + " at volume " + options.volume);
|
||||
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], {
|
||||
position: position,
|
||||
volume: volume
|
||||
});
|
||||
if (!soundPlaying) {
|
||||
soundPlaying = Audio.playSound(chords[guitarSelector + whichChord], {
|
||||
position: position,
|
||||
volume: volume
|
||||
});
|
||||
} else {
|
||||
soundPlaying.restart();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function keyPressEvent(event) {
|
||||
|
|
Loading…
Reference in a new issue