diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 1f7ef83478b..ebc67df7139 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -92,29 +92,29 @@ export class EggLapsePhase extends Phase { } console.time("loading assets " + pokemon.name + " " + eggsRemaining); - pokemon.loadAssets().then(() => { - this.loadsWaiting--; - console.log(this.loadsWaiting); - console.timeEnd("loading assets " + pokemon.name + " " + eggsRemaining); + // pokemon.loadAssets().then(() => { + this.loadsWaiting--; + console.log(this.loadsWaiting); + console.timeEnd("loading assets " + pokemon.name + " " + eggsRemaining); - if (this.loadsWaiting === 0) { - console.timeEnd("hatch eggs"); - this.showSummary(); - } + if (this.loadsWaiting === 0) { + console.timeEnd("hatch eggs"); + this.showSummary(); + } - if (pokemon.species.subLegendary) { - this.scene.validateAchv(achvs.HATCH_SUB_LEGENDARY); - } - if (pokemon.species.legendary) { - this.scene.validateAchv(achvs.HATCH_LEGENDARY); - } - if (pokemon.species.mythical) { - this.scene.validateAchv(achvs.HATCH_MYTHICAL); - } - if (pokemon.isShiny()) { - this.scene.validateAchv(achvs.HATCH_SHINY); - } - }); + if (pokemon.species.subLegendary) { + this.scene.validateAchv(achvs.HATCH_SUB_LEGENDARY); + } + if (pokemon.species.legendary) { + this.scene.validateAchv(achvs.HATCH_LEGENDARY); + } + if (pokemon.species.mythical) { + this.scene.validateAchv(achvs.HATCH_MYTHICAL); + } + if (pokemon.isShiny()) { + this.scene.validateAchv(achvs.HATCH_SHINY); + } + // }); } diff --git a/src/ui/pokemon-hatch-info-container.ts b/src/ui/pokemon-hatch-info-container.ts index 0984bdf9dcb..52d6bcfccc2 100644 --- a/src/ui/pokemon-hatch-info-container.ts +++ b/src/ui/pokemon-hatch-info-container.ts @@ -128,14 +128,17 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer { const formIndex = pokemon.formIndex; const shiny = pokemon.shiny; const variant = pokemon.variant; + this.currentPokemonSprite.setVisible(false); + species.loadAssets(this.scene, female, formIndex, shiny, variant, true).then(() => { - getPokemonSpeciesForm(species.speciesId, pokemon.formIndex).cry(this.scene); - this.currentPokemonSprite.play(species.getSpriteKey(female, formIndex, shiny, variant)); - this.currentPokemonSprite.setPipelineData("shiny", shiny); - this.currentPokemonSprite.setPipelineData("variant", variant); - this.currentPokemonSprite.setPipelineData("spriteKey", species.getSpriteKey(female, formIndex, shiny, variant)); - this.currentPokemonSprite.setVisible(true); - console.timeEnd("display pokemon" + pokemon.name); + getPokemonSpeciesForm(species.speciesId, pokemon.formIndex).cry(this.scene); + this.currentPokemonSprite.play(species.getSpriteKey(female, formIndex, shiny, variant)); + this.currentPokemonSprite.setPipelineData("shiny", shiny); + this.currentPokemonSprite.setPipelineData("variant", variant); + this.currentPokemonSprite.setPipelineData("spriteKey", species.getSpriteKey(female, formIndex, shiny, variant)); + this.currentPokemonSprite.setVisible(true); + console.timeEnd("display pokemon" + pokemon.name); + }); } /**