fix(onitama): prevent game hang by removing tween interruptions
Remove tween interruptions from the selection fade-in and pulse animations to prevent the game state from stopping indefinitely.
This commit is contained in:
parent
b28da1cad3
commit
3568d99e6e
|
|
@ -49,7 +49,9 @@ export class SelectionRenderer {
|
||||||
const tweens = this.scene.tweens;
|
const tweens = this.scene.tweens;
|
||||||
|
|
||||||
// Fade in animation
|
// Fade in animation
|
||||||
const fadeIn = tweens.add({
|
// DO NOT add interruption here
|
||||||
|
// otherwise the game will stop indefinitely
|
||||||
|
tweens.add({
|
||||||
targets: ring,
|
targets: ring,
|
||||||
alpha: 0.8,
|
alpha: 0.8,
|
||||||
duration: ANIMATIONS.selectionFadeIn,
|
duration: ANIMATIONS.selectionFadeIn,
|
||||||
|
|
@ -65,10 +67,8 @@ export class SelectionRenderer {
|
||||||
yoyo: true,
|
yoyo: true,
|
||||||
repeat: -1,
|
repeat: -1,
|
||||||
});
|
});
|
||||||
this.scene.addTweenInterruption(pulseTween);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.scene.addTweenInterruption(fadeIn);
|
|
||||||
|
|
||||||
// Return cleanup function
|
// Return cleanup function
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue