mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-29 21:31:29 +08:00
fix(ASTS) 修复释放技能时本体移动问题
This commit is contained in:
1 parent
d52236347d
commit
3ced49e6d1
2 files changed
+17
No files matched your search
@@ -22,6 +22,9 @@ export default class Unit extends Phaser.Physics.Arcade.Sprite {
|
|||||||
// 目标地点显示
|
// 目标地点显示
|
||||||
this.targetIndicator = null;
|
this.targetIndicator = null;
|
||||||
this.pathGraphics = null;
|
this.pathGraphics = null;
|
||||||
|
|
||||||
|
// 移动控制
|
||||||
|
this.canMove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -627,6 +627,12 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
directionY = pointer.y - this.skillWheel.centerY;
|
directionY = pointer.y - this.skillWheel.centerY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 对于一技能和四技能,设置canMove为false,确保角色不能移动
|
||||||
|
if ((skillIndex === 1 || skillIndex === 4) && !this.isControllingPuppet) {
|
||||||
|
yuange.canMove = false;
|
||||||
|
yuange.setVelocity(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isControllingPuppet) {
|
if (this.isControllingPuppet) {
|
||||||
// 控制傀儡时的技能
|
// 控制傀儡时的技能
|
||||||
switch (skillIndex) {
|
switch (skillIndex) {
|
||||||
@@ -839,6 +845,11 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
// 自动锁定相机到傀儡
|
// 自动锁定相机到傀儡
|
||||||
mod.setCameraLocked(true);
|
mod.setCameraLocked(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 技能释放完成后,恢复移动能力
|
||||||
|
setTimeout(() => {
|
||||||
|
yuange.canMove = true;
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // 技能2:扇形飞镖攻击
|
case 2: // 技能2:扇形飞镖攻击
|
||||||
@@ -873,6 +884,9 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
this.time.delayedCall(500, () => {
|
this.time.delayedCall(500, () => {
|
||||||
yuange.setPosition(targetX, targetY);
|
yuange.setPosition(targetX, targetY);
|
||||||
yuange.setVelocity(0, 0);
|
yuange.setVelocity(0, 0);
|
||||||
|
|
||||||
|
// 技能释放完成后,恢复移动能力
|
||||||
|
yuange.canMove = true;
|
||||||
}, [], this);
|
}, [], this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user