++护盾技能

This commit is contained in:
2025-07-10 00:30:35 +08:00
parent 7dcaf19925
commit 541a944c0c
21 changed files with 1288 additions and 834 deletions

View File

@@ -25,6 +25,7 @@ export class MissionHeroCompComp extends CCComp {
this.on(GameEvent.UseHeroCard,this.call_hero,this)
this.on(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_equip_qpecial_attr,this)
this.on(GameEvent.FightReady,this.fight_ready,this)
this.on(GameEvent.Zhaohuan,this.zhao_huan,this)
}
start() {
@@ -47,7 +48,10 @@ export class MissionHeroCompComp extends CCComp {
change_equip_qpecial_attr(e:GameEvent,data:any){
}
private zhao_huan(event: string, args: any){
console.log("[MissionHeroComp]:zhaohuan",args)
this.addHero(args.uuid,false,true)
}
up_friend_alive_cd(less:number){
}
@@ -135,11 +139,14 @@ export class MissionHeroCompComp extends CCComp {
}
/** 添加英雄 */
private addHero(uuid:number=1001,is_master:boolean=false) {
private addHero(uuid:number=1001,is_master:boolean=false,is_zhaohuan:boolean=false) {
let hero_pos=1
if(is_master){
hero_pos=0
}
if(is_zhaohuan){
hero_pos=2
}
let info:any=this.get_info_and_remove(hero_pos,uuid)
// let info:any={ap:0,hp:0,lv:0}
let hero = ecs.getEntity<Hero>(Hero);