A basic abstract class to act as a holder and processor for UI elements.

Hierarchy (view full)

Constructors

Properties

active: boolean = false
awaitingActionInput: boolean
blockInput: boolean = false
cursor: number = 0
cursorObj: Image
message: Text
mode: null | number
onActionInput: null | Function
pendingPrompt: boolean
prompt: Sprite
scene: default
starterSpecies: default[] = []
textCallbackTimer: null | TimerEvent
textTimer: null | TimerEvent
tutorialActive: boolean = false

Methods

  • Creates a temporary dex attr props that will be used to check whether a pokemon is valid for a challenge and to display the correct shiny, variant, and form based on the StarterPreferences

    Parameters

    • speciesId: number

      the id of the species to get props for

    Returns bigint

    the dex props

  • Get the starter attributes for the given PokemonSpecies, after sanitizing them. If somehow a preference is set for a form, variant, gender, ability or nature that wasn't actually unlocked or is invalid it will be cleared here

    Parameters

    • species: default

      The species to get Starter Preferences for

    Returns StarterAttributes

    StarterAttributes for the species

  • Determines if a passive upgrade is available for the given species ID

    Parameters

    • speciesId: number

      The ID of the species to check the passive of

    Returns boolean

    true if the user has enough candies and a passive has not been unlocked already

  • Determines if an same species egg can be bought for the given species ID

    Parameters

    • speciesId: number

      The ID of the species to check the value reduction of

    Returns boolean

    true if the user has enough candies

  • Determines if 'Animation' based upgrade notifications should be shown

    Returns boolean

    true if upgrade notifications are enabled and set to display an 'Animation'

  • Determines if 'Icon' based upgrade notifications should be shown

    Returns boolean

    true if upgrade notifications are enabled and set to display an 'Icon'

  • Determines if a value reduction upgrade is available for the given species ID

    Parameters

    • speciesId: number

      The ID of the species to check the value reduction of

    Returns boolean

    true if the user has enough candies and all value reductions have not been unlocked already

  • Parameters

    • species: default
    • Optionalshiny: boolean
    • OptionalformIndex: number
    • Optionalfemale: boolean
    • Optionalvariant: Variant
    • OptionalabilityIndex: number
    • OptionalnatureIndex: number
    • forSeen: boolean = false

    Returns void

  • Sets a bounce animation if enabled and the Pokemon has an upgrade

    Parameters

    • icon: Sprite

      Phaser.GameObjects.GameObject to animate

    • species: default

      PokemonSpecies of the icon used to check for upgrades

    • startPaused: boolean = false

      Should this animation be paused after it is added?

    Returns void

  • Parameters

    • text: string
    • Optionalname: string
    • Optionaldelay: null | number
    • Optionalcallback: null | Function
    • OptionalcallbackDelay: null | number
    • Optionalprompt: null | boolean
    • OptionalpromptDelay: null | number

    Returns void

  • Parameters

    • text: string
    • Optionaldelay: number
    • Optionalcallback: Function
    • OptionalcallbackDelay: number
    • Optionalprompt: boolean
    • OptionalpromptDelay: number

    Returns void

  • Parameters

    • iconSetting: any
    • gamepadType: any
    • iconElement: any
    • controlLabel: any

    Returns void

  • Parameters

    • iconSetting: any
    • gamepadType: any
    • iconElement: any
    • controlLabel: any

    Returns void