From 9798040635981ad7797cd9a6b7a9688ca55aa439 Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 20 Dec 2024 11:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=89=E7=A7=8D?= =?UTF-8?q?=E5=AE=9D=E7=AE=B1,1=20=E7=89=A9=E5=93=81=202=20=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E7=A2=8E=E7=89=87=203=20=E8=8B=B1=E9=9B=84=E7=A2=8E?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/map/LuckHomeComp.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/assets/script/game/map/LuckHomeComp.ts b/assets/script/game/map/LuckHomeComp.ts index cb96b02e..b68a17af 100644 --- a/assets/script/game/map/LuckHomeComp.ts +++ b/assets/script/game/map/LuckHomeComp.ts @@ -126,11 +126,21 @@ export class LuckHomeCompComp extends CCComp { } i++; } - this.show_item(chip_uuid,num) - smc.heros[chip_uuid].num += num - + switch(reward){ + case 3: + this.show_hero_chip(chip_uuid,num) + smc.heros[chip_uuid].num += num + break; + case 2: + smc.heros[1005].num += num + break; + case 1: + smc.heros[1006].num += num + break; + } + } - show_item(uuid:number,num:number){ + show_hero_chip(uuid:number,num:number){ let path = "game/gui/hchip"; let prefab: Prefab = oops.res.get(path, Prefab)!; let node = instantiate(prefab);