Is there a method to reverse animation sequence in GameQuery. Currently, if we specify the number of frames in, it will assume that from left to right. Can we start animation from right to left? How to choose one out of the multiaminations ?
Is there a method to reverse animation sequence in GameQuery. Currently, if we specify
Share
There is setAnimation method on which you pass the animation, just pass a reverse animation thing itself.
Refer to this doc.
http://gamequeryjs.com/documentation/api/#setAnimation
Setting offset animation
var simpleHorizontalAnimation = new $.gameQuery.Animation({imageURL: “sh.png”, type: $.gameQuery.ANIMATION_HORIZONTAL, numberOfFrame: 4, delta: 32, rate: 300});
and then you call it like this
.addSprite(“simpleHorizontal”,{animation: simpleHorizontalAnimation, posx: 34})
You can take a further look at https://raw.github.com/onaluf/gameQuery/master/tests/human/Animation/type/test1.html