import { _decorator, Component, Node, Tween, Vec2, Vec3 } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('test2')
export class test2 extends Component {
tween = null
start() {
let bg = this.node.getChildByName('Sprite')
this.tween = new Tween(bg).to(1, {position: new Vec3(100, 100, 0)}).call(()=>{
this.callback()
}).call(()=>{
this.callback2()
}).start()
}
callback() {
console.log("1")
this.tween.stop()
}
callback2() {
console.log("2")
}
update(deltaTime: number) {
}
}
为什么stop无效,日志 “2”也打印了,搞不懂,难道是我用错了吗?
。
?

