import { _decorator, Component, Node, tween, Vec3 } from 'cc'; const { ccclass, property } = _decorator; class BindTarget{ pos:Vec3; } @ccclass('test1') export class test1 extends Component { private bindTarget:BindTarget = null; @property(Node) test_btn:Node = null protected start(): void { this.test_btn.on(Node.EventType.TOUCH_START,()=>{ console.log("test_btn TOUCH_START") }) this.bindTarget = new BindTarget(); this.bindTarget.pos = new Vec3(0,0) let self = this let color_opactiy_tw_size = tween(this.bindTarget).to(1,{pos:new Vec3(100,100)},{ onUpdate(tar:BindTarget) { self.node.position = tar.pos }, }) color_opactiy_tw_size.start(); } }