dd
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user