Commit 6f16e9d0 authored by 陈子煜's avatar 陈子煜

1

parent f6a7549d
This diff is collapsed.
......@@ -26,6 +26,9 @@ export default class GetPrize extends Panel {
@property(Node) content: Node = null;
@property(Node) svga: Node = null;
@property(Node) bg: Node = null;
onLoad() {
this.happy.on(Button.EventType.CLICK, this.clickHappy, this);
this.share.on(Button.EventType.CLICK, this.clickShare, this);
......@@ -34,8 +37,8 @@ export default class GetPrize extends Panel {
async start() {
const {data = this.data} = this.data
console.log(data,112233)
console.log(data.prizeName,22222)
console.log(data, 112233)
console.log(data.prizeName, 22222)
data.map((item, index) => {
const prize = instantiate(this.prizePrefab)
......@@ -49,12 +52,25 @@ export default class GetPrize extends Panel {
const numBg = prize.getChildByName("numBg")
const num = numBg.getChildByName("num")
num.getComponent(Label).string = `X${item.sendCount}`
})
this.bg.active = false;
this.svga.active = true
setTimeout(()=>{
this.bg.active = true
this.svga.active = false
},1000)
})
}
change(){
this.bg.active = true
this.svga.active = false
}
clickShare() {
showPanel(SharePop, {
prizeName: this.data[0].prizeName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment