me.Stage(optionsopt)

new Stage(optionsopt)

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 Attributes Description
options Object <optional>

The stage` parameters

Properties
Name Type Attributes Default Description
cameras Boolean <optional>
[new me.Camera2d()]

a list of cameras (experimental)

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.

static settings :Object

The given constructor options

Methods

static onDestroyEvent()

onDestroyEvent function
called by the state manager before switching to another state

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 Attributes Description
arguments... <optional>

optional arguments passed when switching state

See:
  • me.state#change