GameQuery 中是否有反转动画顺序的方法。目前,如果我们指定帧数,它将假定从左到右。我们可以从右向左开始动画吗?如何从多重胺中选择一种?
最佳答案
有 setAnimation 方法可以传递动画,只需传递反向动画本身即可。
请参阅此文档。
http://gamequeryjs.com/documentation/api/#setAnimation
设置偏移动画 var simpleHorizontalAnimation = new $.gameQuery.Animation({imageURL: "sh.png", type: $.gameQuery.ANIMATION_HORIZONTAL, numberOfFrame: 4, delta: 32, rates: 300});
然后你就这样调用它
.addSprite("simpleHorizontal",{animation: simpleHorizontalAnimation, posx: 34})
您可以进一步查看https://raw.github.com/onaluf/gameQuery/master/tests/human/Animation/type/test1.html
关于javascript - Gamequery 中的反转动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7104570/