奖励 加血 有问题
This commit is contained in:
@@ -288,7 +288,7 @@ export class HeroViewComp extends CCComp {
|
||||
shoot_enemy(skill_uuid:number,y:number=0,x:number=0){
|
||||
// console.log("mon shoot_enemy");
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let atk = smc.skills[skill_uuid].atk+this.atk+this.buff_atk;
|
||||
let atk = smc.skills[skill_uuid].atk+this.atk*smc.vm_data.mission.hero.atk+this.buff_atk;
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
|
||||
pos.y=pos.y + y
|
||||
@@ -302,13 +302,13 @@ export class HeroViewComp extends CCComp {
|
||||
let {pos,t_pos}=this.get_hero_pos(hero)
|
||||
skill.load(pos,BoxSet.HERO,this.node,this.max_skill_uuid,atk,t_pos);
|
||||
if(smc.skills[s_uuid].hp > 0){ //buff加血
|
||||
hero.HeroView.add_hp(smc.skills[s_uuid].hp*this.atk*this.s_boncus)
|
||||
hero.HeroView.add_hp(smc.skills[s_uuid].hp*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk)
|
||||
}
|
||||
if(smc.skills[s_uuid].atk > 0){ //buff加攻击
|
||||
hero.HeroView.add_atk(smc.skills[s_uuid].atk*this.atk*this.s_boncus,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
hero.HeroView.add_atk(smc.skills[s_uuid].atk*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
}
|
||||
if(smc.skills[s_uuid].shield > 0){ //buff护盾
|
||||
hero.HeroView.add_shield(smc.skills[s_uuid].shield*this.atk*this.s_boncus,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
hero.HeroView.add_shield(smc.skills[s_uuid].shield*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
}
|
||||
}
|
||||
push_least_buff(skill:number){
|
||||
@@ -383,7 +383,7 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
|
||||
in_atk(dt: number) {
|
||||
if(this.atk_time >= this.atk_cd){
|
||||
if(this.atk_time >= this.atk_cd*smc.vm_data.mission.hero.atk_cd){
|
||||
if(this.is_atking){
|
||||
this.atk_time = 0;
|
||||
// console.log("atk_cd:"+this.atk_cd);
|
||||
@@ -404,6 +404,9 @@ export class HeroViewComp extends CCComp {
|
||||
// node.setPosition(pos)
|
||||
// node.parent = this.node;
|
||||
}
|
||||
hp_max_add(){
|
||||
console.log("hp_max_add 动画");
|
||||
}
|
||||
add_hp(hp: number=0){
|
||||
this.heathed();
|
||||
this.hp+=hp;
|
||||
@@ -414,7 +417,14 @@ export class HeroViewComp extends CCComp {
|
||||
let hp_progress= this.hp/this.hp_max;
|
||||
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
|
||||
}
|
||||
|
||||
add_hp_max(hp: number=0){
|
||||
this.hp_max_add()
|
||||
// this.hp = this.hp + hp;
|
||||
// this.hp_max = this.hp_max +hp;
|
||||
console.log("hp_max:"+this.hp_max+":"+hp+":"+this.hp)
|
||||
let hp_progress= this.hp/this.hp_max;
|
||||
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
|
||||
}
|
||||
hp_change(hp: number){
|
||||
if(this.is_dead){
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user