From 0f6987da2abd41038a1775ef6dda5d1714dca883 Mon Sep 17 00:00:00 2001 From: chicrobt Date: Sat, 31 Jan 2026 00:58:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(ASTS)=20=E4=BF=AE=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E5=89=8D=E6=94=B6=E5=9B=9E=E6=97=B6=E5=AE=9A=E6=97=B6=E6=B8=85?= =?UTF-8?q?=E6=A5=9A=E4=BB=8D=E5=9C=A8=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/testScenes/AttackSkillTestScene.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scenes/testScenes/AttackSkillTestScene.js b/scenes/testScenes/AttackSkillTestScene.js index da27731..280dab4 100644 --- a/scenes/testScenes/AttackSkillTestScene.js +++ b/scenes/testScenes/AttackSkillTestScene.js @@ -1127,7 +1127,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { this.puppet.clearTarget(); // 一段时间后自动销毁傀儡,切换到本体控制 - this.time.delayedCall(3000, () => { + this.puppetDestructionTimer = this.time.delayedCall(3000, () => { if (this.puppet) { // 销毁眩晕特效 if (this.stunEffect) { @@ -1173,6 +1173,9 @@ export default class AttackSkillTestScene extends Phaser.Scene { firstCastTime: 0, secondCastTime: 0 }; + + // 清除计时器引用 + this.puppetDestructionTimer = null; } }); @@ -1534,6 +1537,12 @@ export default class AttackSkillTestScene extends Phaser.Scene { */ switchToYuange(destroyPuppet = true) { if (destroyPuppet && this.puppet) { + // 清除定时销毁任务 + if (this.puppetDestructionTimer) { + this.puppetDestructionTimer.remove(); + this.puppetDestructionTimer = null; + } + // 删除傀儡 this.puppet.destroy(); this.puppet = null;