From d5719f29f56007d339ffb86eb9306746e79d5eab Mon Sep 17 00:00:00 2001 From: TJH Date: Tue, 12 May 2026 10:13:59 +0800 Subject: [PATCH] 1 --- assets/Game/scripts/SlotBar.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/Game/scripts/SlotBar.ts b/assets/Game/scripts/SlotBar.ts index 8eaf463..dbae5d8 100644 --- a/assets/Game/scripts/SlotBar.ts +++ b/assets/Game/scripts/SlotBar.ts @@ -171,10 +171,6 @@ export class SlotBar extends Component { }); } - protected onDestroy(): void { - this.node.targetOff(this); - } - // spinBtn有两个动画,idle状态循环旋转一圈,spin状态速度加快 setGameInfo(gameInfo: any) { @@ -774,6 +770,7 @@ export class SlotBar extends Component { protected onDestroy(): void { this.autoBtn.off(Node.EventType.TOUCH_START, this.autoAin, this); this.autoBtn.off(Node.EventType.MOUSE_ENTER, this.autoAin, this); + this.node.targetOff(this); this.turboBtn.off(Node.EventType.TOUCH_START, this.fastAni, this); this.turboBtn.off(Node.EventType.MOUSE_ENTER, this.fastAni, this);