在update里面调用tween不知道为啥没起左右

我用的是2.3.1的版本

以下是代码,把update的代码放入start中 时间改为1秒的话 是可以执行成功的,我想实现每帧都运行一次动画,在那帧后执行一次放大缩小 移动位置之类的操作

const {ccclass, property} = cc._decorator;

@ccclass
export default class Main extends cc.Component {

@property(cc.Node)
label: cc.Node = null;

posy : number = 1;
posx : number = 1;

// LIFE-CYCLE CALLBACKS:

// onLoad () {}

start () {




}

update (dt) {

    this.posy += 1;
    this.posx += 1;
    cc.tween(this.label)
    //to,在第一秒的时候放大为2倍,位置为(100,100),角度变化到120
    .to(0.001,{position:cc.v2(this.posx, this.posy)})
    .start();
}

}

每帧执行动画是什么操作?
都每帧了,直接修改属性得了。

用schedule

动作就是每帧改变节点属性为基础的,你还要每帧执行动画?改变思路吧,做个判断

const {ccclass, property} = cc._decorator;

@ccclass
export default class Main extends cc.Component {

@property(cc.Node)
label: cc.Node = null;

posy : number = 1;
posx : number = 1;
interval: number = 0;

// LIFE-CYCLE CALLBACKS:

// onLoad () {}

start () {
}

update (dt) {
this.interval += dt;
if(interval >= 1)
{
this.posy += 1;
this.posx += 1;
cc.tween(this.label)
//to,在第一秒的时候放大为2倍,位置为(100,100),角度变化到120
.to(0.001,{position:cc.v2(this.posx, this.posy)})
.start();
this.interval= 0;
}
}
}

之前一直是自己想叉了,实际上这个地方如果执行移动的距离过大,直接改属性的话,会有一个看起来很不自然的现象,所以我最后还是用runaction来处理这个地方了