dd
This commit is contained in:
@@ -30,6 +30,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
}
|
||||
start() {
|
||||
// this.test_call()
|
||||
this.node.getChildByName("location").active=false
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if(smc.mission.status != 1) return
|
||||
@@ -47,21 +48,21 @@ export class MissionHeroCompComp extends CCComp {
|
||||
console.log("show_heros_pos",args)
|
||||
this.current_hero_uuid=args.uuid
|
||||
this.update_fight_hero_info()
|
||||
this.node.getChildByName("herospos").active=true
|
||||
this.node.getChildByName("location").active=true
|
||||
}
|
||||
update_fight_hero_info(){
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||
for(let hero of heros){
|
||||
let hv = hero.get(HeroViewComp)
|
||||
if(hv.fight_pos==0){
|
||||
let icon=this.node.getChildByName("herospos").getChildByName("heropos1").getChildByName("hero").getChildByName("icon")
|
||||
let icon=this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos1").getChildByName("hero").getChildByName("icon")
|
||||
let icon_frame=oops.res.get(HeroInfo[hv.hero_uuid].icon,SpriteFrame)!
|
||||
icon.getComponent(Sprite).spriteFrame=icon_frame
|
||||
}
|
||||
}
|
||||
}
|
||||
call_hero(event: string, args: any){
|
||||
this.node.getChildByName("herospos").active=false
|
||||
this.node.getChildByName("location").active=false
|
||||
console.log("call_hero",args)
|
||||
let fight_pos=args
|
||||
this.timer.reset()
|
||||
|
||||
Reference in New Issue
Block a user