// 更新行走速度
updateWalkSpeed: function(){
if(this.action === null){
return false;
}
var actionManager = new cc.ActionManager();
// 如果有停止速度的buff 则设置行走状态为假
if(this.distanceSpeedEffect == 'stop' || this.timeSpeedEffect =='stop'){
actionManager.pauseTarget ( this.action );
return;
}
actionManager.resumeTarget ( this.action );
this.walkSpeed = this.walkBaseSpeed + this.timeSpeedEffect + this.distanceSpeedEffect;
// 若距离速度影响使速度小于等于最小速度,则调用最小速度
if(this.walkSpeed < this.minWalkSpeed){
this.walkSpeed = this.minWalkSpeed;
}
}
我把参数改成this.node 也还是不可以 郁闷至极。
原来想用this.node.pause(); 提示这个方法已被废弃