Animation
程序员文章站
2024-01-19 13:46:58
...
//精灵帧动画
cc.spriteFrameCache.addSpriteFrames(res.Sushi_plist, res.Sushi_png);
var size = cc.winSize;
var sprite = new cc.Sprite("#sushi_1n_0.png");
sprite.x = size.width / 2;
sprite.y = size.height / 2;
this.addChild(sprite);
var spriteFrames = [];
for (var i = 0; i < 10; i++){
var frames = cc.spriteFrameCache.getSpriteFrame("sushi_1n_" + i + ".png");
spriteFrames.push(frames);
}
cc.log(spriteFrames);
var animation1 = new cc.Animation.create(spriteFrames, 0.1, 10);
var action = cc.animate(animation1);
sprite.runAction(action);
推荐阅读
-
Animation
-
Animation
-
animation
-
Animation
-
Flutter The argument type ‘Listenable‘ can‘t be assigned to the parameter type ‘Animation<double>
-
Animation
-
安卓三种动画之一View Animation与 案例 为活动的载入与退出添加动画
-
Flutter笔记二 ----Animation
-
Flutter之通过AnimationController源码分析学习使用Animation
-
用matplotlib中的animation.FuncAnimation画动态图