feat: move href logic to state mgr
This commit is contained in:
@@ -46,8 +46,14 @@ export const fearState = {
|
||||
this.currentWidth = newWidth;
|
||||
}
|
||||
|
||||
if (this.wasCaught && this.finaleProgression < FEAR_SETTINGS.EVENT_FINALE_DURATION)
|
||||
this.finaleProgression = Math.min(this.finaleProgression + delta, FEAR_SETTINGS.EVENT_FINALE_DURATION);
|
||||
if (this.wasCaught) {
|
||||
if (this.finaleProgression < FEAR_SETTINGS.EVENT_FINALE_DURATION) {
|
||||
|
||||
this.finaleProgression = Math.min(this.finaleProgression + delta, FEAR_SETTINGS.EVENT_FINALE_DURATION);
|
||||
} else {
|
||||
window.location.href = '/';
|
||||
}
|
||||
}
|
||||
|
||||
this.emit();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user