重构怪物属性系统,移除MonAttrsComp并替换为HeroAttrsComp。更新相关组件和系统以适应新属性结构,确保怪物逻辑与英雄逻辑一致。

This commit is contained in:
2025-10-30 10:45:16 +08:00
parent 2d358e450d
commit e3bdc4b238
6 changed files with 11 additions and 263 deletions

View File

@@ -6,7 +6,6 @@ import { GameEvent } from '../common/config/GameEvent';
import { FacSet } from '../common/config/BoxSet';
import { smc } from '../common/SingletonModuleComp';
import { CCComp } from 'db://oops-framework/module/common/CCComp';
import { MonAttrsComp } from './MonAttrsComp';
import { HeroAttrsComp } from './HeroAttrsComp';
import { SkillEnt } from '../skill/SkillEnt';
import { Attrs } from '../common/config/HeroAttrs';
@@ -107,7 +106,7 @@ export class SkillConComp extends CCComp {
check_target(){
if(this.HeroView.fac==FacSet.HERO){
return ecs.query(ecs.allOf(MonAttrsComp))
return ecs.query(ecs.allOf(HeroAttrsComp))
}else{
return ecs.query(ecs.allOf(HeroAttrsComp))
}