引导完善+ 说小贴士
This commit is contained in:
@@ -15,12 +15,26 @@ export class HeroReadyCom extends Component {
|
||||
protected onLoad(): void {
|
||||
oops.message.on(GameEvent.UpdateHero,this.update_hero,this)
|
||||
oops.message.on(GameEvent.UpdateFightHero,this.update_hero,this)
|
||||
oops.message.on(GameEvent.HeroSpeek,this.to_speek,this)
|
||||
}
|
||||
start() {
|
||||
this.hide_speek()
|
||||
this.update_hero()
|
||||
|
||||
}
|
||||
|
||||
hide_speek(){
|
||||
this.node.getChildByName("tooltip").active=false
|
||||
}
|
||||
to_speek(e:any,args:any){
|
||||
console.log("[HeroReadyCom]:to_speek",args,this.slot)
|
||||
if(args.slot!=this.slot) return
|
||||
if(smc.fight_heros[this.slot]==0) return
|
||||
this.node.getChildByName("tooltip").active=true
|
||||
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = args.words
|
||||
this.scheduleOnce(()=>{
|
||||
this.hide_speek()
|
||||
},3)
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
@@ -45,6 +59,7 @@ export class HeroReadyCom extends Component {
|
||||
// console.log("[HeroReadyCom]clip",this.node.getChildByName("icon").getComponent(Animation))
|
||||
|
||||
}
|
||||
|
||||
no_hero(){
|
||||
this.node.getChildByName("lv").active=false
|
||||
this.node.getChildByName("add").active=true
|
||||
|
||||
Reference in New Issue
Block a user