Add animated combat growth rewards
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user