feat(skill) 添加傀儡3技能及相关联动效果

This commit is contained in:
wvellichor committed 2026-01-18 02:22:38 +08:00
1 parent 0d88556089
commit 8b801b8df0
2 files changed
+250 -38

No files matched your search

+6
View File
@@ -159,6 +159,12 @@ export default class Unit extends Phaser.Physics.Arcade.Sprite {
* @param {number} y - 垂直方向 (-1 到 1)
*/
moveRelative(x, y) {
// 检查是否可以移动
if (this.canMove === false) {
this.setVelocity(0, 0);
return;
}
const speed = 150; // 单位:像素/秒
// 归一化方向向量
const magnitude = Math.sqrt(x * x + y * y);