cocos-engine
cocos-engine copied to clipboard
[Tween System] Unlimited time update api
Cocos Creator version
3.8.2
System information
MacOS
Issue description
Right now we have a finite time 'update' api. good job!
As discussed in the previous issue, this api gives users more freedom and is the basis for some speed-driven animations, hopefully soon.
tween()
.update(
(target: T, dt: number, ...args: R) => {
const [speed] = args;
target.string = String(Number(target.string) + speed);
if (target.string === "100") {
return false;
}
},
...args,
)
.start();
Details: https://github.com/cocos/cocos-engine/issues/17076
Relevant error log output
No response
Steps to reproduce
.
Minimal reproduction project
No response