Add animated combat growth rewards

This commit is contained in:
2026-06-22 15:38:41 +09:00
parent ce8050c5cc
commit 305484a7c3
2 changed files with 424 additions and 37 deletions

View File

@@ -90,6 +90,21 @@ class SoundDirector {
window.setTimeout(() => this.playTone(450, 0.08, 0.028, 'sine'), 70);
}
playGrowthTick() {
if (this.playEffect('exp-gain', { volume: 0.18, rate: 1.12, stopAfterMs: 360 })) {
return;
}
this.playTone(620, 0.05, 0.018, 'triangle');
}
playLevelUp() {
this.playEffect('exp-gain', { volume: 0.42, rate: 1.08, stopAfterMs: 820 });
this.playTone(520, 0.08, 0.035, 'triangle');
window.setTimeout(() => this.playTone(720, 0.09, 0.04, 'triangle'), 82);
window.setTimeout(() => this.playTone(980, 0.12, 0.034, 'sine'), 168);
}
playEffect(key: string, options: PlayEffectOptions = {}) {
if (!this.started || this.muted) {
return false;