diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 96779f38..73772e47 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -104,6 +104,7 @@ export class Hero extends ecs.Entity { // 初始化 buff/debuff 系统 model.initAttrs(); model.Attrs[Attrs.REVIVE_COUNT]=1 + this.add(hv); oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid}) const move = this.get(HeroMoveComp); diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 85011a22..07f29d60 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -124,6 +124,7 @@ export class HeroViewComp extends CCComp { this.top_node = this.node.getChildByName("top"); let hp_y = this.node.getComponent(UITransform).height+10; this.top_node.setPosition(0, hp_y, 0); + smc.updateHeroInfo(this.model) }