pokemon-rogue-battle
    Preparing search index...

    Class that represents egg hatching

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Function that animates egg shaking

      Parameters

      • intensity: number

        of horizontal shaking. Doubled on the first call (where count is 0)

      • OptionalrepeatCount: number

        the number of times this function should be called (asynchronous recursion?!?)

      • Optionalcount: number

        the current number of times this function has been called.

      Returns Promise<void>

      nothing since it's a Promise

    • Animates spraying

      Parameters

      • intensity: number

        number of times this is repeated (this is a badly named variable)

      • OptionaloffsetY: number

        how much to offset the Y coordinates

      Returns void

    • Animates a particle used in the spray animation

      Parameters

      • trigIndex: number

        Used to modify the particle's vertical speed, is a random number from 0-7

      • offsetY: number

        how much to offset the Y coordinate

      Returns void

    • Helper function to generate sine. (Why is this not a Utils?!?)

      Parameters

      • index: number

        random number from 0-7 being passed in to scale pi/128

      • amplitude: number

        Scaling

      Returns number

      a number

    • Tries to skip the hatching animation

      Returns boolean

      false if cannot be skipped or already skipped. True otherwise