修改为三种宝箱,1 物品 2 技能碎片 3 英雄碎片
This commit is contained in:
@@ -126,11 +126,21 @@ export class LuckHomeCompComp extends CCComp {
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
this.show_item(chip_uuid,num)
|
switch(reward){
|
||||||
smc.heros[chip_uuid].num += num
|
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 path = "game/gui/hchip";
|
||||||
let prefab: Prefab = oops.res.get(path, Prefab)!;
|
let prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||||
let node = instantiate(prefab);
|
let node = instantiate(prefab);
|
||||||
|
|||||||
Reference in New Issue
Block a user