diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index ae7d1dc8..82bf921b 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -211,10 +211,10 @@ export class HeroViewComp extends CCComp { } /** 血量提示(伤害数字) */ - private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 90) { + private hp_tip(type: number = 1, value: string = "", s_uuid: number = 1001, y: number = 100) { let tip = ecs.getEntity(Tooltip); let x = this.node.position.x; - let ny = this.node.getComponent(UITransform).height + 60; + let ny = this.node.getComponent(UITransform).height + y; let pos = v3(x, ny, 0); tip.load(pos, type, value, s_uuid, this.node.parent); } @@ -302,15 +302,16 @@ export class HeroViewComp extends CCComp { //后退 back(){ if(this.model.fac==FacSet.MON) { - let tx=this.node.position.x+5 + let tx=this.node.position.x+30 if(tx > 320) tx=320 tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start() } - if(this.model.fac==FacSet.HERO) { - let tx=this.node.position.x-5 - if(tx < -320) tx=-320 - tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start() - } + //英雄不再后退 + // if(this.model.fac==FacSet.HERO) { + // let tx=this.node.position.x-30 + // if(tx < -320) tx=-320 + // tween(this.node).to(0.1, { position:v3(tx,this.node.position.y,0)}).start() + // } } // 伤害计算和战斗逻辑已迁移到 HeroBattleSystem