[LayaAirIDE3]请教一下3.3中新的tween怎么动画结束后传参给回调的方法

请教一下3.3中新的tween不用匿名函数怎么在动画结束后传参给回调的方法,
已邀请:

后海里的鱼

赞同来自: 谷主

可以使用userData携带,方式如下:
Laya.Tween.create(target).to("x", 1).duration(100).userData({ prop: "xx" }).then(this.onComplete, this);
 
private onComplete(tweener: Laya.ITweener): void {
console.log(tweener.userData);
}

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作