The static class that manages scene transitions.
Methods
SceneManager.backgroundBitmap()Bitmapstatic
- Gets the background bitmap
Returns:
Type Description Bitmap The background bitmap - Catching for exceptions
Name Type Description e
Error|Array|* The error encountered - Catching for load Errors
Name Type Description e
Array Array of error information for the error encountered - Catching for normal Error type errors
Name Type Description e
Error The error encountered - Catching for all other Errors
Name Type Description e
* An object of any type with error information - Changes the scene, if needed
- Check if the player's browser supports necessary technologies to run an RPG Maker game
Throws:
Errors if browser does not support WebGL, Web Audio API, CSS Font Loading, or IndexedDB - Check if any plugin errors exist
- Clears the scene stack
- Check how many times to update based on time since last frame
Name Type Description deltaTime
number Scalar time value from last frame to this frame. - Exits the game
- Goes directly to the given scene
Name Type Description sceneClass
Stage The scene to go to - Initializes WebAudio
- Attempts to initialize Graphics
Throws:
Error if Graphics could not be initialized - Initializes Input and TouchInput
- Initializes Video
- Initialize the SceneManager
- Check if the current scene is busy
Returns:
Type Description boolean True if the scene is busy - Check if the game window is active. Will also return true if this check could not be completed
Returns:
Type Description boolean True if game window has focus. - Check if the provided scene is the next scene
Name Type Description sceneClass
Stage The scene to check Returns:
Type Description boolean True if the passed scene class is the next scene - Check if the provided scene is the previous scene
Name Type Description sceneClass
Stage The scene to check Returns:
Type Description boolean True if the passed scene class is the previous scene - Check if the scene is changing
Returns:
Type Description boolean True if game is exiting or there is a next scene to go to - Handling before a scene is started
- Handling for errors
Name Type Description event
Object The error event - Handling for when a keydown event is fired. See Documentation
Name Type Description event
event The keydown event - Handling for an uncaught exception in Promise when unhandledrejection event is fired. See Documentation
Name Type Description event
Object The error event - Handling for when a scene is created
- Handling when a scene is started
- Handling for when a scene is terminated
- Handling for when an unload event is fired. See Documentation
- Pops the last scene on the end of the scene stack
- Prepares the next scene with the given arguments
Name Type Description arguments
* Arguments to be passed to the next scene's prepare function - Pushes the given scene onto the end of the scene stack
Name Type Description sceneClass
Stage The scene to push to the stack - Reloads the game, if nwjs is available in the environment
- Resumes the main game loop
- Starts the main game loop with the given scene class as the base stage
Name Type Description sceneClass
Stage The first scene when game starts, default is Scene_Boot - Sets JS event listeners for error, unhandledrejection, unload, and keydown
- Shows the chrome dev tools, if nwjs is available in the environment and is a test play
SceneManager.snap()Bitmapstatic
- Snaps a bitmap of the current scene
Returns:
Type Description Bitmap A bitmap of the current scene as it appears when called - Snaps a bitmap of the current scene for use in the background
- Stops the main game loop
- Exit the game (if nwjs)
- Updates the SceneManager
Name Type Description deltaTime
number Scalar time value from last frame to this frame. - Update Effekseer
- Add one to the frame count
- Update Input and TouchInput
- Update the game
- Updates the current scene