fix(战斗系统): 修复角色状态切换和击退效果的问题

- 在HeroMove和MonMove系统中增加攻击状态检查,避免攻击时被错误切换为待机状态
- 为HeroAtkSystem添加受击者击退效果
- 优化HeroViewComp的击退逻辑,包括英雄和怪物,并修复重复触发问题
- 修复怪物死亡后状态切换问题
This commit is contained in:
walkpan
2026-01-03 13:41:08 +08:00
parent 1cce4ce361
commit 08c153ee5d
4 changed files with 34 additions and 13 deletions

View File

@@ -123,7 +123,9 @@ export class HeroMoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
move.direction = 1;
}
} else {
view.status_change("idle");
if (!model.is_atking) {
view.status_change("idle");
}
// 因为敌人在面前而暂时停止不设置moving为false保持检查状态
}
}