mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-23 08:42:19 +02:00
Fix incorrect resetSprite
timing
This commit is contained in:
parent
1ed1380781
commit
67249b75e2
@ -3584,6 +3584,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
* info container.
|
* info container.
|
||||||
*/
|
*/
|
||||||
leaveField(clearEffects: boolean = true, hideInfo: boolean = true) {
|
leaveField(clearEffects: boolean = true, hideInfo: boolean = true) {
|
||||||
|
this.resetSprite();
|
||||||
this.resetTurnData();
|
this.resetTurnData();
|
||||||
if (clearEffects) {
|
if (clearEffects) {
|
||||||
this.resetSummonData();
|
this.resetSummonData();
|
||||||
@ -3592,7 +3593,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (hideInfo) {
|
if (hideInfo) {
|
||||||
this.hideInfo();
|
this.hideInfo();
|
||||||
}
|
}
|
||||||
this.resetSprite();
|
|
||||||
this.scene.field.remove(this);
|
this.scene.field.remove(this);
|
||||||
this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true);
|
this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true);
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,9 @@ export class ReturnPhase extends SwitchSummonPhase {
|
|||||||
onEnd(): void {
|
onEnd(): void {
|
||||||
const pokemon = this.getPokemon();
|
const pokemon = this.getPokemon();
|
||||||
|
|
||||||
|
pokemon.resetSprite();
|
||||||
pokemon.resetTurnData();
|
pokemon.resetTurnData();
|
||||||
pokemon.resetSummonData();
|
pokemon.resetSummonData();
|
||||||
pokemon.resetSprite();
|
|
||||||
|
|
||||||
this.scene.updateFieldScale();
|
this.scene.updateFieldScale();
|
||||||
|
|
||||||
|
@ -92,13 +92,13 @@ export abstract class ModalUiHandler extends UiHandler {
|
|||||||
if (args[0].hasOwnProperty("fadeOut") && typeof args[0].fadeOut === "function") {
|
if (args[0].hasOwnProperty("fadeOut") && typeof args[0].fadeOut === "function") {
|
||||||
const [ marginTop, marginRight, marginBottom, marginLeft ] = this.getMargin();
|
const [ marginTop, marginRight, marginBottom, marginLeft ] = this.getMargin();
|
||||||
|
|
||||||
const overlay = this.scene.add.rectangle(( this.getWidth() + marginLeft + marginRight) / 2, (this.getHeight() + marginTop + marginBottom) / 2,this.scene.game.canvas.width / 6,this.scene.game.canvas.height /6, 0);
|
const overlay = this.scene.add.rectangle(( this.getWidth() + marginLeft + marginRight) / 2, (this.getHeight() + marginTop + marginBottom) / 2, this.scene.game.canvas.width / 6, this.scene.game.canvas.height /6, 0);
|
||||||
overlay.setOrigin(0.5,0.5);
|
overlay.setOrigin(0.5, 0.5);
|
||||||
overlay.setName("rect-ui-overlay-modal");
|
overlay.setName("rect-ui-overlay-modal");
|
||||||
overlay.setAlpha(0);
|
overlay.setAlpha(0);
|
||||||
|
|
||||||
this.modalContainer.add(overlay);
|
this.modalContainer.add(overlay);
|
||||||
this.modalContainer.moveTo(overlay,0);
|
this.modalContainer.moveTo(overlay, 0);
|
||||||
|
|
||||||
this.scene.tweens.add({
|
this.scene.tweens.add({
|
||||||
targets: overlay,
|
targets: overlay,
|
||||||
|
Loading…
Reference in New Issue
Block a user