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: PhaseInterceptorPhase

      The phase to run.

    • OptionalskipFn: ((className: PhaseClass) => boolean)

      Optional skip function.

        • (className): boolean
        • Parameters

          • className: PhaseClass

          Returns boolean

    Returns Promise<void>

    A promise that resolves when the phase is run.

  • m2m to set mode.

    Parameters

    • mode: Mode

      The Mode to set.

    • Rest...args: unknown[]

      Additional arguments to pass to the original method.

    Returns Promise<void>

  • 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: PhaseInterceptorPhase

      The phase to transition to.

    • runTarget: boolean = true

      Whether or not to run the target phase.

    Returns Promise<void>

    A promise that resolves when the transition is complete.

  • Parameters

    • phaseTarget: PhaseInterceptorPhase
    • OptionalskipFn: ((className: PhaseClass) => boolean)
        • (className): boolean
        • Parameters

          • className: PhaseClass

          Returns boolean

    Returns Promise<void>