Class Bounce
Defined in: Bounce.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Bounce()
A test class to demonstrate the use of the VisualGameObject class
|
Field Attributes | Field Name and Description |
---|---|
The movement speed
|
|
The movement direction in the x axis
|
|
The movement direction in the x axis
|
Method Attributes | Method Name and Description |
---|---|
startupBounce(image)
Initialises this object
|
|
update(dt, context, xScroll, yScroll)
Updates the object
|
Class Detail
Bounce()
A test class to demonstrate the use of the VisualGameObject class
Author: Matthew Casperson.
Author: Matthew Casperson.
Field Detail
{Number}
speed
The movement speed
{Number}
xDirection
The movement direction in the x axis
{Number}
yDirection
The movement direction in the x axis
Method Detail
startupBounce(image)
Initialises this object
- Parameters:
- image
- Returns:
- A reference to the initialised object
update(dt, context, xScroll, yScroll)
Updates the object
- Parameters:
- {Number} dt
- The time since the last frame in seconds
- {CanvasRenderingContext2D} context
- The drawing context
- {Number} xScroll
- The global scrolling value of the x axis
- {Number} yScroll
- The global scrolling value of the y axis