This commit is contained in:
2025-05-23 16:23:16 +08:00
parent 2c3f682b18
commit 85856ccc28
3 changed files with 6495 additions and 700 deletions

View File

@@ -60,15 +60,15 @@ export class CardComp extends CCComp {
this.node.getChildByName("Button").getChildByName("Label").getComponent(Label).string=this.check_heros()
}
check_heros(){
let heros=ecs.query(ecs.allOf(HeroModelComp))
for(let hero of heros){
if(hero.get(HeroViewComp).hero_uuid == this.c_uuid){
return "升级"
}
if(hero.get(HeroViewComp).type==HeroInfo[this.c_uuid].type){
return "替换"
}
}
// let heros=ecs.query(ecs.allOf(HeroModelComp))
// for(let hero of heros){
// if(hero.get(HeroViewComp).hero_uuid == this.c_uuid){
// return "升级"
// }
// if(hero.get(HeroViewComp).type==HeroInfo[this.c_uuid].type){
// return "替换"
// }
// }
return "召唤"
}
use_card(){