refactor(英雄属性): 移除DIS属性及相关代码
移除英雄和怪物类中不再使用的DIS属性,包括初始化、赋值和引用代码
This commit is contained in:
@@ -155,7 +155,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.Attrs[Attrs.DEF] = this.base_def;
|
||||
this.Attrs[Attrs.AP] = this.base_ap;
|
||||
this.Attrs[Attrs.SPEED] = this.base_speed;
|
||||
this.Attrs[Attrs.DIS] = this.base_dis;
|
||||
|
||||
// 2. 初始化其他属性(无初始值的)
|
||||
for (const attrKey in this.Attrs) {
|
||||
@@ -165,8 +164,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
attrIndex !== Attrs.MP_MAX &&
|
||||
attrIndex !== Attrs.DEF &&
|
||||
attrIndex !== Attrs.AP &&
|
||||
attrIndex !== Attrs.SPEED &&
|
||||
attrIndex !== Attrs.DIS
|
||||
attrIndex !== Attrs.SPEED
|
||||
) {
|
||||
this.Attrs[attrIndex] = 0;
|
||||
}
|
||||
@@ -270,7 +268,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
case Attrs.DEF: return this.base_def;
|
||||
case Attrs.AP: return this.base_ap;
|
||||
case Attrs.SPEED: return this.base_speed;
|
||||
case Attrs.DIS: return this.base_dis;
|
||||
case Attrs.SHIELD_MAX: return 0;
|
||||
default: return 0;
|
||||
}
|
||||
@@ -651,7 +648,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.base_hp = 100;
|
||||
this.base_mp = 100;
|
||||
this.base_speed = 100;
|
||||
this.base_dis = 100;
|
||||
this.base_dis = 0;
|
||||
this.hp = 100;
|
||||
this.mp = 100;
|
||||
this.shield = 0;
|
||||
|
||||
Reference in New Issue
Block a user