You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an animation then want to dynamic control its speed with action speed.
But it is very strange that whatever i add or plus its speed, the animation always speed up.
here is the code:
var animationFrames = [];
for(var i=1;i!=8;i++){
var path = typeName + i +'.png';
var frame = cc.spriteFrameCache.getSpriteFrame(path);
animationFrames.push(frame);
}
var animation = new cc.Animation(animationFrames,intervalTime);
var runningAction = new cc.animate(animation).repeatForever();
runningAction.retain();
here is the speedup function:
adjustRunningSpeed:function(x){
var speedx = this.runningAction.getSpeed();
var finalSpeed = speedx + x;
this.runningAction.setSpeed(finalSpeed);
},
The text was updated successfully, but these errors were encountered:
I have an animation then want to dynamic control its speed with action speed.
But it is very strange that whatever i add or plus its speed, the animation always speed up.
here is the code:
here is the speedup function:
},
The text was updated successfully, but these errors were encountered: