Class RepeatingGameObject
Defined in: RepeatingGameObject.js.
Constructor Attributes | Constructor Name and Description |
---|---|
A class that display a repeating texture that can optionall be offset in either
the x or y axis
|
Field Attributes | Field Name and Description |
---|---|
The height that the final image will take up
|
|
How much of the scrollX and scrollY to apply when drawing
|
|
The width that the final image will take up
|
Method Attributes | Method Name and Description |
---|---|
draw(dt, context, xScroll, yScroll)
Draws this element to the back buffer
|
|
drawRepeat(canvas, newPosition, newFillArea, newScrollPosition)
|
|
Clean this object up
|
|
startupRepeatingGameObject(image, x, y, z, width, height, scrollFactor)
Initialises this object
|
Class Detail
RepeatingGameObject()
A class that display a repeating texture that can optionall be offset in either
the x or y axis
Author: Matthew Casperson.
Author: Matthew Casperson.
Field Detail
{Number}
height
The height that the final image will take up
{Number}
scrollFactor
How much of the scrollX and scrollY to apply when drawing
{Number}
width
The width that the final image will take up
Method Detail
draw(dt, context, xScroll, yScroll)
Draws this element to the back buffer
- Parameters:
- dt
- Time in seconds since the last frame
- context
- The context to draw to
- xScroll
- The global scrolling value of the x axis
- yScroll
- The global scrolling value of the y axis
drawRepeat(canvas, newPosition, newFillArea, newScrollPosition)
- Parameters:
- canvas
- newPosition
- newFillArea
- newScrollPosition
shutdownstartupRepeatingGameObject()
Clean this object up
startupRepeatingGameObject(image, x, y, z, width, height, scrollFactor)
Initialises this object
- Parameters:
- image
- x
- y
- z
- width
- height
- scrollFactor
- Returns:
- A reference to the initialised object