PokéRogue
    Preparing search index...

    Class for handling general animations such as particle effects. For battle animations, see BattleAnim.

    Index

    Constructors

    Methods

    • Parameters

      • pokeball: Sprite

      Returns void

    • Parameters

      • index: number
      • amplitude: number

      Returns number

    • Helper function for doArcDownward, handles a single particle

      Parameters

      • trigIndex: number

        Starting offset for particle

      • transformationBaseBg: Image

        The background image

      • transformationContainer: Container

        The phaser container

      • xOffset: number

        The x offset

      • yOffset: number

        The y offset

      Returns void

    • Animates particles that arc downwards after the upwards spiral for evolution/form change animations.

      Parameters

      • transformationBaseBg: Image

        The background image to animate

      • transformationContainer: Container

        The Phaser.GameObjects.Container | Container which will own the particles

      • xOffset: number = 0

        The x offset

      • yOffset: number = 0

        The y offset

      Returns void

    • Animates particles in a circle pattern

      Parameters

      • transformationBaseBg: Image

        The background image

      • transformationContainer: Container

        The phaser container

      • xOffset: number = 0

        The x offset

      • yOffset: number = 0

        The y offset

      Returns void

    • Helper function for doCircleInward, handles a single particle

      Parameters

      • trigIndex: number

        Starting offset for particle

      • speed: number

        How much the amplitude slows down by each cycle

      • transformationBaseBg: Image

        The background image

      • transformationContainer: Container

        The phaser container

      • xOffset: number

        The x offset

      • yOffset: number

        The y offset

      Returns void

    • Animates the transformation between the old pokemon form and new pokemon form

      Parameters

      • currentCycle: number

        Variable to track how many cycles have been run and also how long the delay is

      • finalCycle: number

        Number representing how many times to recursively cycle the animation

      • pokemonTintSprite: Sprite

        The tinted sprite of the Pokemon

      • pokemonNewFormTintSprite: Sprite

        The tinted sprite of the Pokemon's new form

      • Optionalcancelled: BooleanHolder<boolean>

        If its value is set to true by external code during the animation, then cancel the animation.

      Returns Promise<void>

    • Parameters

      • x: number
      • y: number
      • radius: number

      Returns void

    • Parameters

      • trigIndex: number
      • x: number
      • y: number
      • xSpeed: number
      • ySpeed: number
      • angle: number
      • frameIndex: number

      Returns Image

    • Parameters

      • x: number
      • y: number

      Returns void

    • Play the shiny sparkle animation and sound effect for the given sprite First ensures that the animation has been properly initialized

      Parameters

      • sparkleSprite: Sprite

        the Sprite to play the animation on

      • variant: Variant

        which shiny variant to play the animation for

      Returns void

    • Animates particles that "spiral" upwards at start of transform animation

      Parameters

      • transformationBaseBg: Image

        The background image to animate.

      • transformationContainer: Container

        The phaser container

      • xOffset: number = 0

        The x offset

      • yOffset: number = 0

        The y offset

      Returns void

    • Helper function for doSpiralUpward, handles a single particle

      Parameters

      • trigIndex: number

        Starting offset for particle

      • transformationBaseBg: Image

        The background image

      • transformationContainer: Container

        The phaser container

      • xOffset: number

        The x offset

      • yOffset: number

        The y offset

      Returns void

    • Parameters

      • transformationBaseBg: Image
      • transformationContainer: Container

      Returns void

    • Parameters

      • trigIndex: number
      • transformationBaseBg: Image
      • transformationContainer: Container

      Returns void

    • Parameters

      • x: number
      • y: number

      Returns void

    • Parameters

      • index: number
      • amplitude: number

      Returns number