diff --git a/scenes/testScenes/AttackSkillTestScene.js b/scenes/testScenes/AttackSkillTestScene.js index c9b66aa..4929bc7 100644 --- a/scenes/testScenes/AttackSkillTestScene.js +++ b/scenes/testScenes/AttackSkillTestScene.js @@ -617,7 +617,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { directionY = direction.y * 100; } else { // 基于技能轮盘中心到指针的相对方向 - const pointer = this.input.activePointer; + const pointer = this.skillWheel.activePointer || this.input.activePointer; directionX = pointer.x - this.skillWheel.centerX; directionY = pointer.y - this.skillWheel.centerY; } @@ -882,7 +882,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { if (!this.currentlyControlled) return; // 计算技能释放方向(基于技能轮盘中心到指针的相对方向) - const pointer = this.input.activePointer; + const pointer = this.skillWheel.activePointer || this.input.activePointer; const directionX = pointer.x - this.skillWheel.centerX; const directionY = pointer.y - this.skillWheel.centerY; @@ -946,7 +946,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { if (!this.currentlyControlled) return; // 计算技能释放方向(基于技能轮盘中心到指针的相对方向) - const pointer = this.input.activePointer; + const pointer = this.skillWheel.activePointer || this.input.activePointer; const directionX = pointer.x - this.skillWheel.centerX; const directionY = pointer.y - this.skillWheel.centerY; @@ -1167,7 +1167,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { if (!this.currentlyControlled) return; // 计算技能释放方向(基于技能轮盘中心到指针的相对方向) - const pointer = this.input.activePointer; + const pointer = this.skillWheel.activePointer || this.input.activePointer; const directionX = pointer.x - this.skillWheel.centerX; const directionY = pointer.y - this.skillWheel.centerY; @@ -1436,7 +1436,7 @@ export default class AttackSkillTestScene extends Phaser.Scene { const diaochan = this.currentlyControlled; // 计算技能释放方向(基于技能轮盘中心到指针的相对方向) - const pointer = this.input.activePointer; + const pointer = this.skillWheel.activePointer || this.input.activePointer; // 计算轮盘中心到指针的方向向量 const directionX = pointer.x - this.skillWheel.centerX; const directionY = pointer.y - this.skillWheel.centerY;