Class: Stage

me. Stage

new Stage(options)

A default "Stage" object
every "stage" object (title screen, credits, ingame, etc...) to be managed
through the state manager must inherit from this base class.
Parameters:
Name Type Argument Description
options Object <optional>
The stage` parameters
Properties
Name Type Argument Default Description
cameras Boolean <optional>
[new me.Camera2d()] a list of cameras (experimental)
Source:
stage.js, line 32
See:

Extends

Members

<static> cameras :Map

The list of active cameras in this stage. Cameras will be renderered based on this order defined in this list. Only the "default" camera will be resized when the window or canvas is resized.
Type:
  • Map
Source:
stage.js, line 37

<static> settings :Object

The given constructor options
Type:
  • Object
Source:
stage.js, line 48

Methods

<static> onDestroyEvent()

onDestroyEvent function
called by the state manager before switching to another state
Source:
stage.js, line 113

<static> onResetEvent()

onResetEvent function
called by the state manager when reseting the object this is typically where you will load a level, add renderables, etc...
Parameters:
Name Type Argument Description
arguments... <optional>
optional arguments passed when switching state
Source:
stage.js, line 99
See:
  • me.state#change