refactor(hero&monster): 统一使用dis字段获取攻击距离
移除HeroDisVal映射表,改为直接从实体组件读取配置的dis属性作为攻击距离,同时补全所有英雄和怪物配置中的dis字段
This commit is contained in:
@@ -254,8 +254,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
* @param skillsComp 技能组件
|
||||
*/
|
||||
public updateSkillDistanceCache(): void {
|
||||
const rangeType = this.type as HType.Melee | HType.Mid | HType.Long;
|
||||
const maxRange = HeroDisVal[rangeType];
|
||||
const maxRange = this.dis;
|
||||
let minRange = 0;
|
||||
this.maxSkillDistance = maxRange;
|
||||
this.minSkillDistance = minRange;
|
||||
|
||||
Reference in New Issue
Block a user