PrivatecanPrivateeggThe egg that is hatching
PrivateeggThe phaser container that holds the egg
PrivateeggThe container that lists how many eggs are hatching
PrivateeggThe phaser sprite of the cracks in an egg
PrivateeggThe phaser image that is the background
PrivateeggThe phaser gameobject container that holds everything
PrivateeggThe new EggHatchData for the egg/pokemon that hatches
PrivateeggThe scene handler for egg hatching
PrivateeggThe phaser rectangle that overlays during the scene
PrivateeggPrivateeggThe phaser sprite that represents the overlaid light rays
PrivateeggThe index of which egg move is unlocked. 0-2 is common, 3 is rare
PrivateeggThe phaser sprite of the egg
PrivateeggsThe number of eggs that are hatching
PrivateevolutionThe sound effect being played when the egg is hatched
PrivatehatchedInternal booleans representing if the egg is hatched, able to be skipped, or skipped
PrivateinfoThe PokemonInfoContainer of the newly hatched Pokemon
ReadonlyphaseThe string name of the phase, used to identify the phase type for is
PrivatepokemonThe newly hatched PlayerPokemon
PrivatepokemonThe phaser sprite for shiny sparkles
PrivatepokemonThe phaser sprite of the hatched Pokemon
PrivateskippedFunction that animates egg shaking
of horizontal shaking. Doubled on the first call (where count is 0)
OptionalrepeatCount: numberthe number of times this function should be called (asynchronous recursion?!?)
Optionalcount: numberthe current number of times this function has been called.
nothing since it's a Promise
Plays the animation of an egg hatch
Function to do the logic and animation of completing a hatch and revealing the Pokemon
Animates spraying
number of times this is repeated (this is a badly named variable)
OptionaloffsetY: numberhow much to offset the Y coordinates
Animates a particle used in the spray animation
Used to modify the particle's vertical speed, is a random number from 0-7
how much to offset the Y coordinate
End the current phase and start a new one.
Generates a Pokemon to be hatched by the egg Also stores the generated pokemon in this.eggHatchData
the hatched PlayerPokemon
Check if the phase is of the given type without requiring instanceof.
The string name of the phase to check.
Whether this phase is of the provided type.
Helper function to generate sine. (Why is this not a Utils?!?)
random number from 0-7 being passed in to scale pi/128
Scaling
a number
Start the current phase.
Tries to skip the hatching animation
false if cannot be skipped or already skipped. True otherwise
Class that represents egg hatching