Class: AnimSprite

Graphics.AnimSprite

new Graphics.AnimSprite (game, width, height, url, frameWidth, frameHeight, animSpeed)

Animated Sprite class
Name Type Description
game Core.Game the game object
width Number the sprite width
height Number the sprite height
url String URL to the resource
frameWidth Number sprite frame tile width
frameHeight Number sprite frame tile height
animSpeed Number animation speed - fps.

Methods

render ()

renders the sprite with the animation.

startAnimation ()

starts playing the animation

staticRender ()

renders the sprite statically (disregards the animation)

stopAnimation ()

stops playing the animation.

updateAnim ()

updates the animation.