Class: Scene

Scene() → {Scene}

Template for a scene, must be overriden by user extened scenes

Found in Chapter 4, page 157 of the textbook

Example: 4.5 Scene Objects

Constructor

new Scene() → {Scene}

Source:
Returns:
a new Scene instance
Type
Scene

Methods

draw()

Draw this Scene to the camera, must be overriden by subclass
Source:

init()

To initialize the level, called from loop.start(), should be overriden by subclass
Source:

load()

Load the necessary resources, should be overriden by subclass
Source:

next()

Stop the GameLoop and unload this Scene, Subclasses must call super.next()
Source:

(async) start()

Asynchronous method to start this scene in accordance with the GameLoop
Source:

stop()

Stop the GameLoop, unload this Scene, and call engine.cleanUp()
Source:

unload()

Unload all the loaded resources, should be overriden by subclass
Source:

update()

Update this Scene, must be overriden by subclass
Source: