dd
This commit is contained in:
@@ -119,7 +119,7 @@ export class HeroViewComp extends CCComp {
|
||||
// return
|
||||
// }
|
||||
if(this.is_dead) {
|
||||
console.log("[HeroViewComp]:alive friend cd",this.Friend_alive_cd ,this.Friend_alive_cd.elapsedTime)
|
||||
// console.log("[HeroViewComp]:alive friend cd",this.Friend_alive_cd ,this.Friend_alive_cd.elapsedTime)
|
||||
if(this.Friend_alive_cd.update(dt)){
|
||||
|
||||
this.to_alive()
|
||||
@@ -152,7 +152,7 @@ export class HeroViewComp extends CCComp {
|
||||
this.atk_skill=6001
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
get isActive() {
|
||||
return this.ent.has(HeroViewComp) && this.node?.isValid;
|
||||
}
|
||||
@@ -187,6 +187,7 @@ export class HeroViewComp extends CCComp {
|
||||
* @param ap 要增加的攻击。
|
||||
*/
|
||||
add_ap(ap: number,is_num:boolean=true){
|
||||
console.log("[HeroViewComp]:add_ap add:",ap,this.ap)
|
||||
if(is_num){
|
||||
this.ap += Math.floor(ap);
|
||||
}else{
|
||||
@@ -196,6 +197,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
|
||||
de_ap(ap: number,is_num:boolean=true){
|
||||
console.log("[HeroViewComp]:de_ap de:",ap,this.ap)
|
||||
if(is_num){
|
||||
this.ap -= Math.floor(ap);
|
||||
}else{
|
||||
@@ -205,6 +207,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
|
||||
add_hp_max(hp: number=0,is_num:boolean=true){
|
||||
console.log("[HeroViewComp]:add_hp_max add:",hp,this.hp_max)
|
||||
if(is_num){
|
||||
this.hp_max += Math.floor(hp) ;
|
||||
this.hp += Math.floor(hp) ;
|
||||
@@ -216,6 +219,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
|
||||
de_hp_max(hp: number=0,is_num:boolean=true){
|
||||
console.log("[HeroViewComp]:de_hp_max de:",hp,this.hp_max)
|
||||
if(is_num){
|
||||
this.hp_max -= Math.floor(hp) ;
|
||||
}else{
|
||||
@@ -252,7 +256,7 @@ export class HeroViewComp extends CCComp {
|
||||
if(!this.is_master) return
|
||||
this.atk_count+=1
|
||||
if(this.atk_count< FightSet.ATK_ADD_FRIEND_COUNT) return
|
||||
if(this.FIGHTCON.atk_add_glod >0) smc.mission.add_gold(this.FIGHTCON.atk_add_glod)
|
||||
if(this.FIGHTCON.atk_add_glod >0) smc.vmdata.mission_data.gold+=this.FIGHTCON.atk_add_glod
|
||||
|
||||
this.do_friend_atk_add()
|
||||
this.do_master_atk_add()
|
||||
|
||||
Reference in New Issue
Block a user