初始版本可以去申请电子版权和软著了

This commit is contained in:
2025-08-21 13:54:28 +08:00
parent 0a654d130a
commit 1b56cb7a8c
12 changed files with 1816 additions and 185 deletions

View File

@@ -23,15 +23,18 @@ export class HCardUICom extends Component {
update(deltaTime: number) {
}
to_update_hero(){
this.update_data(this.h_uuid,{type:this.type})
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})
}
}
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)
this.h_uuid=uuid
this.node.getChildByName("in_fight").active=this.check_in_fight(uuid)
this.node.getChildByName("in_fight").active=this.check_in_fight()
let hero_data = HeroInfo[uuid]
let hero= this.node.getChildByName("hero")
let anm_path=hero_data.path
@@ -69,7 +72,7 @@ export class HCardUICom extends Component {
break
case HeroConSet.SELECT:
if(oops.gui.has(UIID.HeroSelect)) {
this.check_in_slot(this.h_uuid)
this.check_in_slot()
smc.setFightHero(this.slot,this.h_uuid,true)
oops.message.dispatchEvent(GameEvent.UpdateFightHero)
oops.gui.remove(UIID.HeroSelect)
@@ -77,18 +80,18 @@ export class HCardUICom extends Component {
break
}
}
check_in_slot(uuid:number){ //如果英雄在出战位,则移除久的出战位
check_in_slot(){ //如果英雄在出战位,则移除久的出战位
let heros=smc.fight_heros
for(let i=0;i<GameSet.HERO_NUM;i++){
if(heros[i]==uuid) {
if(heros[i]==this.h_uuid) {
smc.setFightHero(i,0,true)
}
}
}
check_in_fight(uuid:number){
check_in_fight(){
let heros=smc.fight_heros
for(let i=0;i<GameSet.HERO_NUM;i++){
if(heros[i]==uuid) return true
if(heros[i]==this.h_uuid) return true
}
return false
}