heros 卡片 细节完善 思考下步内容

This commit is contained in:
2024-11-19 10:52:20 +08:00
parent ce8b47de7d
commit e89f590979
6 changed files with 694 additions and 529 deletions

View File

@@ -119,7 +119,8 @@ export class MissionComp extends CCComp {
}
mission_end(){
smc.vm_data.mission.play=false
let heros:any= ecs.query(ecs.allOf(HeroViewComp));
let heros:any= ecs.query(ecs.allOf(HeroModelComp));
let monsters:any= ecs.query(ecs.allOf(MonModelComp));
let hcards:any= ecs.query(ecs.allOf(HCardComp));
let hcns=this.node.getChildByName("hcards")
for(let i=0;i<hcns.children.length;i++){
@@ -127,10 +128,14 @@ export class MissionComp extends CCComp {
}
for(let i=0;i<heros.length;i++){
heros[i].HeroView.ent.destroy()
}
for(let i=0;i<hcards.length;i++){
hcards[i].HCardComp.ent.destroy()
}
for(let i=0;i<monsters.length;i++){
monsters[i].HeroView.ent.destroy()
}
}
on_mon_dead(){
let coin =(GameSet.MON_COIN_ADD*smc.vm_data.mission.coin_reward_add*(1+Talents[1006].bonus*smc.vm_data.talent[1006].lv)).toFixed(0)
@@ -217,7 +222,7 @@ export class MissionComp extends CCComp {
for(let i=0;i<heros.length;i++){
let hcard = ecs.getEntity<HCard>(HCard)
console.log("hcard:",hcard)
hcard.load(1001,0,node)
hcard.load(1001,i,node)
}
}