refactor(hero): 将is_atking状态从HeroViewComp移到HeroAttrsComp

将攻击状态is_atking从视图组件HeroViewComp移动到属性组件HeroAttrsComp,以保持状态管理的集中性
This commit is contained in:
panw
2025-10-30 16:11:07 +08:00
parent 56f45a7bb4
commit bdcc606e02
3 changed files with 5 additions and 5 deletions

View File

@@ -227,7 +227,7 @@ export class SkillAutocastSystem extends ecs.ComblockSystem implements ecs.ISyst
if (heroModel.is_dead || heroModel.isStun() || heroModel.isFrost()) return;
// 检查是否正在攻击(只有攻击时才释放技能)
if (!heroView.is_atking) return;
if (!heroModel.is_atking) return;
// 获取所有可施放的技能
const readySkills = skillsData.getReadySkills(heroModel.mp);