The scene to be managed.
PrivateendPrivate OptionalinPrivateintervalPrivateintervalPrivateonTODO: This should not be an array; Our linear phase system means only 1 phase is ever started at once (if any)
PrivateoriginalPrivateoriginalEnd the current phase and start a new one.
PrivatePHASESList of phases with their corresponding start methods.
CAUTION: If a phase and its subclasses (if any) both appear in this list,
make sure that this list contains said phase AFTER all of its subclasses.
This way, the phase's prototype.start is properly preserved during
initPhases() so that its subclasses can use super.start() properly.
PrivatepromptPrivatepromptsMethod to add an action to the next prompt.
The target phase for the prompt.
The mode of the UI.
The callback function to execute.
OptionalexpireFn: () => voidThe function to determine if the prompt has expired.
???; default false
Clears phase logs
Method to initialize phases and their corresponding methods.
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.
PrivaterunMethod to run the current phase with an optional skip function.
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.
Whether or not the current scene should also be run.
Method to start the prompt handler.
PrivatesuperMethod to end a phase and log it.
Method to transition to a target phase.
The phase to transition to.
Whether or not to run the target phase; default true.
A promise that resolves when the transition is complete.
Constructor to initialize the scene and properties, and to start the phase handling.