Class Index | File Index

Classes


Class AnimatedGameObject


Defined in: AnimatedGameObject.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Displays an animated Game Object
Field Summary
Field Attributes Field Name and Description
 
Defines the current frame that is to be rendered
 
The width of each individual frame
 
Defines the frames per second of the animation
 
Time until the next frame
Method Summary
Method Attributes Method Name and Description
 
draw(dt, context, xScroll, yScroll)
Draws this element to the back buffer
 
startupAnimatedGameObject(image, x, y, z, frameCount, fps)
Initialises this object
Class Detail
AnimatedGameObject()
Displays an animated Game Object
Author: Matthew Casperson.
Field Detail
{Number} currentFrame
Defines the current frame that is to be rendered

{Number} frameWidth
The width of each individual frame

{Number} timeBetweenFrames
Defines the frames per second of the animation

{number} timeSinceLastFrame
Time until the next frame
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
The context to draw to
{Number} xScroll
The global scrolling value of the x axis
{Number} yScroll
The global scrolling value of the y axis

startupAnimatedGameObject(image, x, y, z, frameCount, fps)
Initialises this object
Parameters:
{Image} image
The image to be displayed
{Number} x
The position on the X axis
{Number} y
The position on the Y axis
{Number} z
The depth
{Number} frameCount
The number of animation frames in the image
{Number} fps
The frames per second to animate this object at

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Jun 27 2009 14:23:52 GMT+1000 (EST)