Class: AnimFrame

Graphics.AnimFrame

the animation frame class

new Graphics.AnimFrame (px, py, w, h)

Name Type Description
px Number the frame x position
py Number the frame y position
w Number the frame width
h Number the frame height

Methods

getAnimationIndex ()Number

get current animation index
Returns:
Type Description
Number current animation index

getFrameIndex ()Number

get current frame index
Returns:
Type Description
Number current frame index

nextAnimation (max_height)

sets the current to next animation
Name Type Description
max_height Number the maximum height of the spritesheet

nextFrame (max_width)

sets the current to next frame
Name Type Description
max_width Number the maximum width of the spritesheet

setAnimationIndex (i, max_height)

set animation index
Name Type Description
i Number animation index to set
max_height Number the maximum height of the spritesheet

setFrameIndex (i, max_width)

set frame index
Name Type Description
i Number frame index to set
max_width Number the maximum width of the spritesheet