mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
add tween function destroySelf (#14309)
This commit is contained in:
@@ -389,6 +389,18 @@ export class Tween<T> {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @en
|
||||
* Add a destroySelf action, only for node target.
|
||||
* @zh
|
||||
* 添加一个移除并销毁自己 action,只适用于 target 是节点类型的。
|
||||
*/
|
||||
destroySelf (): Tween<T> {
|
||||
const action = removeSelf(true);
|
||||
this._actions.push(action);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @en
|
||||
* Stop all tweens
|
||||
|
||||
Reference in New Issue
Block a user