Class GameObject
Defined in: GameObject.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The base class for all elements that appear in the game.
|
Field Attributes | Field Name and Description |
---|---|
The position on the X axis
|
|
The position on the Y axis
|
|
Display depth order.
|
Method Attributes | Method Name and Description |
---|---|
Cleans up the object, and removes it from the list of objects held by the GameObjectManager.
|
|
startupGameObject(x, y, z)
Initialises the object, and adds it to the list of objects held by the GameObjectManager.
|
Class Detail
GameObject()
The base class for all elements that appear in the game.
Author: Matthew Casperson.
Author: Matthew Casperson.
Field Detail
{Number}
x
The position on the X axis
{Number}
y
The position on the Y axis
{Number}
zOrder
Display depth order. A smaller zOrder means the element is rendered first, and therefor
in the background.
Method Detail
shutdownGameObject()
Cleans up the object, and removes it from the list of objects held by the GameObjectManager.
startupGameObject(x, y, z)
Initialises the object, and adds it to the list of objects held by the GameObjectManager.
- Parameters:
- {Number} x
- The position on the X axis
- {Number} y
- The position on the Y axis
- {Number} z
- The z order of the element (elements in the background have a lower z value)