fix: 修复怪物技能、朝向和飘字显示问题
1. 修正技能节点缩放逻辑,确保镜像显示正确 2. 修复怪物反向移动时的朝向错误 3. 调整伤害飘字的Y轴偏移,优化显示位置 4. 更新怪物配置的技能ID,修正技能绑定错误
This commit is contained in:
@@ -103,7 +103,10 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
const dirForAngle = new Vec3();
|
||||
Vec3.subtract(dirForAngle, adjustedTargetPos, adjustedStartPos);
|
||||
if (dirForAngle.length() > 0.01) {
|
||||
const angle = Math.atan2(dirForAngle.y, dirForAngle.x) * (180 / Math.PI);
|
||||
let angle = Math.atan2(dirForAngle.y, dirForAngle.x) * (180 / Math.PI);
|
||||
if (moveComp.scale < 0) {
|
||||
angle += 180;
|
||||
}
|
||||
node.angle = angle;
|
||||
}
|
||||
break;
|
||||
@@ -209,7 +212,10 @@ export class SMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
Vec3.subtract(direction, nextPos, moveComp.currentPos);
|
||||
|
||||
if (direction.length() > 0.01) {
|
||||
const angle = Math.atan2(direction.y, direction.x) * (180 / Math.PI);
|
||||
let angle = Math.atan2(direction.y, direction.x) * (180 / Math.PI);
|
||||
if (moveComp.scale < 0) {
|
||||
angle += 180;
|
||||
}
|
||||
node.angle = angle;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user