开始新手引导
This commit is contained in:
@@ -6,33 +6,35 @@ import { UIID } from '../common/config/GameUIConfig';
|
||||
import { GameSet, HeroConSet, QualitySet } from '../common/config/BoxSet';
|
||||
import { HttpReturn } from 'db://oops-framework/libs/network/HttpRequest';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
||||
import { CCComp } from 'db://oops-framework/module/common/CCComp';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HCardUICom')
|
||||
export class HCardUICom extends Component {
|
||||
@ecs.register('HCardUICom', false)
|
||||
export class HCardUICom extends CCComp {
|
||||
h_uuid:number=0
|
||||
type:number=0
|
||||
slot:number=0
|
||||
|
||||
start() {
|
||||
// console.log("[HCardUICom]:start")
|
||||
}
|
||||
protected onLoad(): void {
|
||||
oops.message.on(GameEvent.UpdateHero,this.to_update_hero,this)
|
||||
this.on(GameEvent.UpdateHero,this.to_update_hero,this)
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
to_update_hero(event:any,args:any){
|
||||
if(args.uuid==this.h_uuid){
|
||||
// console.log("[HCardUICom]:是我诶:",HeroInfo[args.uuid].name+args.uuid)
|
||||
this.update_data(args.uuid,{type:this.type})
|
||||
console.log("[HCardUICom]:是我诶:",HeroInfo[args.uuid].name+args.uuid,this.h_uuid)
|
||||
this.update_data(this.h_uuid,{type:this.type})
|
||||
}
|
||||
}
|
||||
update_data(uuid:number,args:any){
|
||||
this.type=args.type
|
||||
if(args.slot) this.slot=args.slot
|
||||
// console.log("[HCardUICom]:update_data",uuid,this.type,this.slot,args)
|
||||
console.log("[HCardUICom]:update_data",uuid,this.type,this.slot,args,this.node)
|
||||
this.h_uuid=uuid
|
||||
this.node.getChildByName("in_fight").active=this.check_in_fight()
|
||||
let hero_data = HeroInfo[uuid]
|
||||
@@ -95,6 +97,9 @@ export class HCardUICom extends Component {
|
||||
}
|
||||
return false
|
||||
}
|
||||
reset() {
|
||||
this.node.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export class HInfoComp extends Component {
|
||||
|
||||
this.h_uuid=uuid
|
||||
let hero_data = HeroInfo[uuid]
|
||||
// console.log("[HInfoComp]:update_data",uuid,hero_data,this.node)
|
||||
console.log("[HInfoComp]:update_data",uuid,hero_data,this.node)
|
||||
let lv=smc.heros[uuid]?.lv??1
|
||||
let anm_path=hero_data.path
|
||||
resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => {
|
||||
@@ -133,6 +133,9 @@ export class HInfoComp extends Component {
|
||||
close(){
|
||||
oops.gui.removeByNode(this.node)
|
||||
}
|
||||
reset() {
|
||||
this.node.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ export class HeroReadyCom extends Component {
|
||||
if(oops.gui.has(UIID.HeroSelect)) return
|
||||
oops.gui.open(UIID.HeroSelect,{slot:this.slot})
|
||||
}
|
||||
reset() {
|
||||
this.node.destroy()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,9 @@ export class HeroSelectCom extends Component {
|
||||
close(){
|
||||
oops.gui.removeByNode(this.node)
|
||||
}
|
||||
reset() {
|
||||
this.node.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user