tSpin & lineClear sound together
This commit is contained in:
parent
e3d4520af7
commit
490566e49f
@ -59,7 +59,7 @@
|
||||
<fieldset class="row g-2 mb-3 align-items-center text-center">
|
||||
<legend class="text-start">Interface</legend>
|
||||
<label for="sfxVolumeRange" class="col-2 col-form-label">Volume</label>
|
||||
<div class="col-4 d-flex align-items-baseline"><input id="sfxVolumeRange" class="form-range" type="range" min="0" max="1" step="any" value="0.5"></div>
|
||||
<div class="col-4 d-flex align-items-baseline"><input id="sfxVolumeRange" class="form-range" type="range" min="0" max="1" step="any" value="0.7"></div>
|
||||
<div class="col-4"><select name="stylesheet" id="stylesheetSelect" class="form-select" oninput="document.selectedStyleSheetSet=this.value">
|
||||
<option selected>Classique</option>
|
||||
<option>Minimal</option>
|
||||
|
@ -253,7 +253,7 @@ class Stats {
|
||||
|
||||
// Sound
|
||||
if (sfxVolumeRange.value) {
|
||||
if (nbClearedLines == 4 || (nbClearedLines && tSpin)) playSound(quatuorSound, this.combo)
|
||||
if (nbClearedLines == 4) playSound(quatuorSound, this.combo)
|
||||
else if (nbClearedLines) playSound(lineClearSound, this.combo)
|
||||
if (tSpin) playSound(tSpinSound)
|
||||
}
|
||||
@ -289,7 +289,6 @@ Stats.prototype.timeFormat = new Intl.DateTimeFormat("fr-FR", {
|
||||
})
|
||||
|
||||
function playSound(sound, note=0) {
|
||||
sound.pause()
|
||||
sound.currentTime = 0
|
||||
sound.playbackRate = Math.pow(5/4, note)
|
||||
sound.play()
|
||||
|
Loading…
x
Reference in New Issue
Block a user