diff --git a/cocos/tween/tween.ts b/cocos/tween/tween.ts index 4b808601d8..29fb148f70 100644 --- a/cocos/tween/tween.ts +++ b/cocos/tween/tween.ts @@ -389,6 +389,18 @@ export class Tween { return this; } + /** + * @en + * Add a destroySelf action, only for node target. + * @zh + * 添加一个移除并销毁自己 action,只适用于 target 是节点类型的。 + */ + destroySelf (): Tween { + const action = removeSelf(true); + this._actions.push(action); + return this; + } + /** * @en * Stop all tweens