Class VisualGameObject
Defined in: VisualGameObject.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 image that will be displayed by this object
|
Method Attributes | Method Name and Description |
---|---|
draw(dt, context, xScroll, yScroll)
Draws this element to the back buffer
|
|
Clean this object up
|
|
startupVisualGameObject(image, x, y, z)
Initialises this object
|
Class Detail
VisualGameObject()
The base class for all elements that appear in the game.
Author: Matthew Casperson.
Author: Matthew Casperson.
Field Detail
{Image}
image
The image that will be displayed by this object
Method Detail
draw(dt, context, xScroll, yScroll)
Draws this element to the back buffer
- Parameters:
- {Number} dt
- Time in seconds since the last frame
- {CanvasRenderingContext2D} context
- {Number} xScroll
- {Number} yScroll
shutdownVisualGameObject()
Clean this object up
startupVisualGameObject(image, x, y, z)
Initialises this object
- Parameters:
- {Image} image
- The image to be displayed
- {Number} x
- {Number} y
- {Number} z