Fix race condition in SwitchSummonPhase (#3588)
This commit is contained in:
parent
0eb1262f40
commit
e697a78fc5
|
@ -1643,9 +1643,9 @@ export class SwitchSummonPhase extends SummonPhase {
|
|||
ease: "Sine.easeIn",
|
||||
scale: 0.5,
|
||||
onComplete: () => {
|
||||
// 250ms delay on leaveField is necessary to avoid calling hideInfo() twice
|
||||
// 300ms delay on leaveField is necessary to avoid calling hideInfo() twice
|
||||
// and double-animating the stats panel slideout
|
||||
this.scene.time.delayedCall(250, () => pokemon.leaveField(!this.batonPass));
|
||||
this.scene.time.delayedCall(300, () => pokemon.leaveField(!this.batonPass));
|
||||
this.scene.time.delayedCall(750, () => this.switchAndSummon());
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue