From 43a3803b6f524322e11799f29e30d29d59fc6e19 Mon Sep 17 00:00:00 2001 From: chicrobot Date: Fri, 30 Jan 2026 17:39:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(ASTS)=20=E4=BF=AE=E5=A4=8D=E5=9B=9B?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E9=87=8A=E6=94=BE=E6=9C=9F=E9=97=B4=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=BD=BF=E7=94=A8=E6=8A=80=E8=83=BD=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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scenes/testScenes/AttackSkillTestScene.js b/scenes/testScenes/AttackSkillTestScene.js index c2703d3..44f1750 100644 --- a/scenes/testScenes/AttackSkillTestScene.js +++ b/scenes/testScenes/AttackSkillTestScene.js @@ -41,6 +41,9 @@ export default class AttackSkillTestScene extends Phaser.Scene { this.touchVisualizations = []; // 触摸点可视化元素 this.joysticks = []; // 多个虚拟摇杆 this.dualJoystickEnabled = false; // 禁用双摇杆,只保留左侧移动摇杆 + + // 技能释放状态 + this.isCastingSkill = false; // 是否正在释放技能 } // create方法:当场景创建时自动调用,用于初始化游戏元素 @@ -598,6 +601,9 @@ export default class AttackSkillTestScene extends Phaser.Scene { // 检查是否有当前控制的角色 if (!this.currentlyControlled) return; + // 检查是否正在释放技能(特别是四技能) + if (this.isCastingSkill) return; + // 根据当前控制角色类型和技能索引释放对应技能 if (this.currentlyControlled.type === 'yuange' || this.currentlyControlled.type === 'yuange-puppet') { this.castYuangeSkill(skillIndex, direction); @@ -861,6 +867,9 @@ export default class AttackSkillTestScene extends Phaser.Scene { case 4: // 技能4:本体向技能指向方向移动 // 确保是本体在控制 if (!this.isControllingPuppet) { + // 设置技能释放状态为true,防止释放其他技能 + this.isCastingSkill = true; + // 使用轮盘相对方向计算目标位置 const maxDistance = 200; const distance = Math.sqrt(directionX * directionX + directionY * directionY); @@ -887,6 +896,9 @@ export default class AttackSkillTestScene extends Phaser.Scene { // 技能释放完成后,恢复移动能力 yuange.canMove = true; + + // 技能释放完成,设置技能释放状态为false + this.isCastingSkill = false; }, [], this); } break;