Readonly
phaseThe string name of the phase, used to identify the phase type for is
Function that animates egg shaking
of horizontal shaking. Doubled on the first call (where count is 0)
Optional
repeatCount: numberthe number of times this function should be called (asynchronous recursion?!?)
Optional
count: 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)
Optional
offsetY: 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
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
Tries to skip the hatching animation
false if cannot be skipped or already skipped. True otherwise
Class that represents egg hatching