项目遇到了项目需要动态修改Tween的速度,再查阅的一番资料找到了解决方案,特别感谢GT大佬
tween.start() 之后会出现一个 _finalAction 成员。
修改 _finalAction._speedMethod = true 。之后可以通过 _finalAction._speed 修改速度。
例
this.nodeTween = tw(this.node)
.sequence(
tw().to(0.5, { position: cc.v3(10,10) }),
tw().to(0.5, { position: cc.v3(20,20) }),
)
.repeatForever()
.start()
this.nodeTween._finalAction._speedMethod = true
this.nodeTween._finalAction._speed = 0.3
后面直接修改_speed的值就OK(_speed默认为1值越大速度越快)
问题已解决,个人理解大佬勿喷