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