gameQuery

gameQuery allows you to declare animations. Animations are made of one image with a succession of frames just like in a css sprite. An animation in itself doesn’t exist until it’s associated with a sprite. Those are the attributes an animation can have:

* imageURL: the URL of the image
* numberOfFrame: the total number of frame in the animation (for example for a 10×10 sprite with 15 frames your image will be 10×150 or 150×10)
* delta: the width of height (depending on the type) of one frame
* rate: the number of milliseconds between two frame
* type: the type of animation, it’s a binary OR of the following value:
o Animation.VERTICAL for vertical, the various frames are stacked verticaly
o Animation.HORIZONTAL for horizontal, the various frames are layed horizontaly
o Animation.ONCE if you don’t want the animation to loop
o Animation.CALLBACK a function executed at the end of each animation cycle

Related Posts