Class enchant.Scene
Class that becomes the root of the display object tree. Child Entity objects are distributed to the Scene layer according to the drawing method. The DOM of each Scene layer has a (enchant.DOMLayer and enchant.CanvasLayer) and is drawn using the Canvas. Scenes are drawn in the order that they are added.
- Defined in: enchant.js
- Extends enchant.Group
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class enchant.Group:
- childNodes, firstChild, lastChild, originX, originY, rotation, scaleX, scaleY
- Fields borrowed from class enchant.Node:
- age, parentNode, scene, x, y
Method Summary
- Methods borrowed from class enchant.Group:
- addChild
- insertBefore
- removeChild
- Methods borrowed from class enchant.Node:
- moveBy
- moveTo
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.Scene()
var scene = new Scene(); scene.addChild(player); scene.addChild(enemy); core.pushScene(scene);