英雄去除 smchp
This commit is contained in:
@@ -36,16 +36,13 @@ export class HeroViewComp extends CCComp {
|
||||
scale: number = 1; /** 角色阵营 1:hero -1 :mon */
|
||||
type: number = 0; /**角色类型 0近战-需要贴身 1远程-保持距离 2辅助 */
|
||||
fac:number=0; //阵营 0:hero 1:monster
|
||||
|
||||
vmHero:any={}
|
||||
skill_cd:number=0;
|
||||
skill_cd_max:number=1.3;
|
||||
|
||||
/**
|
||||
* 获取当前血量 - 根据阵营选择正确的变量
|
||||
*/
|
||||
get currentHp(): number {
|
||||
if (this.fac === FacSet.HERO) {
|
||||
return this.vmHero.hp || 0;
|
||||
}
|
||||
return this.hp;
|
||||
}
|
||||
|
||||
@@ -53,20 +50,13 @@ export class HeroViewComp extends CCComp {
|
||||
* 设置当前血量 - 根据阵营选择正确的变量
|
||||
*/
|
||||
set currentHp(value: number) {
|
||||
if (this.fac === FacSet.HERO) {
|
||||
this.vmHero.hp = value;
|
||||
} else {
|
||||
this.hp = value;
|
||||
}
|
||||
this.hp = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最大血量 - 根据阵营选择正确的变量
|
||||
*/
|
||||
get currentHpMax(): number {
|
||||
if (this.fac === FacSet.HERO) {
|
||||
return this.vmHero.hp_max || 0;
|
||||
}
|
||||
return this.hp_max;
|
||||
}
|
||||
|
||||
@@ -74,11 +64,7 @@ export class HeroViewComp extends CCComp {
|
||||
* 设置最大血量 - 根据阵营选择正确的变量
|
||||
*/
|
||||
set currentHpMax(value: number) {
|
||||
if (this.fac === FacSet.HERO) {
|
||||
this.vmHero.hp_max = value;
|
||||
} else {
|
||||
this.hp_max = value;
|
||||
}
|
||||
this.hp_max = value;
|
||||
}
|
||||
|
||||
box_group:number = BoxSet.HERO;
|
||||
|
||||
Reference in New Issue
Block a user