修改为三种宝箱,1 物品 2 技能碎片 3 英雄碎片

This commit is contained in:
2024-12-20 11:03:07 +08:00
parent c4e1f55d12
commit 9798040635

View File

@@ -126,11 +126,21 @@ export class LuckHomeCompComp extends CCComp {
}
i++;
}
this.show_item(chip_uuid,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);