TweenPool.ts 236 B

123456789101112
  1. export class TweenPool {
  2. private _tweens: cc.Tween<any>[] = [];
  3. add(tween: cc.Tween<any>) {
  4. this._tweens.push(tween);
  5. }
  6. clear() {
  7. this._tweens?.forEach(v => v.stop());
  8. this._tweens = [];
  9. }
  10. }