mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-29 20:41:29 +08:00
feat(skill) 添加傀儡3技能及相关联动效果
This commit is contained in:
1 parent
0d88556089
commit
8b801b8df0
2 files changed
+250
-38
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user