Constructors

Properties

log: string[]
phases: {} = {}
scene: any

Methods

  • Method to add an action to the next prompt.

    Parameters

    • phaseTarget: string

      The target phase for the prompt.

    • mode: Mode

      The mode of the UI.

    • callback: (() => void)

      The callback function to execute.

        • (): void
        • Returns void

    • OptionalexpireFn: (() => void)

      The function to determine if the prompt has expired.

        • (): void
        • Returns void

    • awaitingActionInput: boolean = false

    Returns void

  • Restores the original state of phases and clears intervals.

    This function iterates through all phases and resets their start method to the original function stored in this.phases. Additionally, it clears the promptInterval and interval.

    Returns void

  • Method to run a phase with an optional skip function.

    Parameters

    • phaseTarget: any

      The phase to run.

    • OptionalskipFn: any

      Optional skip function.

    Returns Promise<void>

    A promise that resolves when the phase is run.

  • Remove the current phase from the phase interceptor.

    Do not call this unless absolutely necessary. This function is intended for cleaning up the phase interceptor when, for whatever reason, a phase is manually ended without using the phase interceptor.

    Parameters

    • shouldRun: boolean = false

      Whether or not the current scene should also be run.

    Returns void

  • Method to transition to a target phase.

    Parameters

    • phaseTo: any

      The phase to transition to.

    • runTarget: boolean = true

    Returns Promise<void>

    A promise that resolves when the transition is complete.