From c8e4190f18d208b543a53ad043946e21b1bcccc2 Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 6 Dec 2024 16:42:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20=E5=88=9D=E6=AD=A5=20=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF=E6=8F=90=E9=86=92bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/game/gui/hero_card.prefab | 1 - assets/resources/gui/role_controller.prefab | 2 +- assets/script/game/hero/HeroCardComp.ts | 2 +- assets/script/game/map/HeroHomeComp.ts | 3 +++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/resources/game/gui/hero_card.prefab b/assets/resources/game/gui/hero_card.prefab index 86336e5c..2f5564d0 100644 --- a/assets/resources/game/gui/hero_card.prefab +++ b/assets/resources/game/gui/hero_card.prefab @@ -1981,7 +1981,6 @@ "__prefab": { "__id__": 85 }, - "hcc_home": null, "_id": "" }, { diff --git a/assets/resources/gui/role_controller.prefab b/assets/resources/gui/role_controller.prefab index d9f9a9b9..e61d4201 100644 --- a/assets/resources/gui/role_controller.prefab +++ b/assets/resources/gui/role_controller.prefab @@ -28900,7 +28900,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "75OQX2gjJNqo96DWc/aEWA" + "fileId": "f7/EZY8/pM04gz3JrN9oit" }, { "__type__": "cc.PrefabInfo", diff --git a/assets/script/game/hero/HeroCardComp.ts b/assets/script/game/hero/HeroCardComp.ts index 06a5074c..5fa3847b 100644 --- a/assets/script/game/hero/HeroCardComp.ts +++ b/assets/script/game/hero/HeroCardComp.ts @@ -10,7 +10,6 @@ const { ccclass, property } = _decorator; @ccclass('HeroCardComp') @ecs.register('HeroCardComp', false) export class HeroCardComp extends CCComp { - @property(HeroHomeComp) hcc_home: HeroHomeComp = null!; hcc_uuid: number = 0; onLoad() { @@ -27,6 +26,7 @@ export class HeroCardComp extends CCComp { oops.message.dispatchEvent("hero_card_show_info",{uuid:this.hcc_uuid}) } check_show(event: string, args: any){ + // console.log("hero_card check_show",args) this.show_bg(false) if(args.uuid==this.hcc_uuid){ this.show_bg(true) diff --git a/assets/script/game/map/HeroHomeComp.ts b/assets/script/game/map/HeroHomeComp.ts index 7d3324ca..8282f8bf 100644 --- a/assets/script/game/map/HeroHomeComp.ts +++ b/assets/script/game/map/HeroHomeComp.ts @@ -105,6 +105,9 @@ export class HeroHomeComp extends CCComp { } } + + + lv_up(){ console.log("升级",smc.vmdata.items[1001],smc.heros[this.h_uuid].lv*HeroInfo[this.h_uuid].lvexp) if(smc.vmdata.items[1001] < smc.heros[this.h_uuid].lv*HeroInfo[this.h_uuid].lvexp){