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
tutorialOverlay: Rectangle

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

  • Parameters

    • speciesId: number

    Returns {
        currentFriendship: number;
        friendshipCap: number;
    }

    • currentFriendship: number
    • friendshipCap: number
  • 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

  • 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

  • Update the display of candy upgrade icons or animations for the given StarterContainer

    Parameters

    Returns void

  • Parameters

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

    Returns void