Commit 9654b219 authored by wjf's avatar wjf

l

parents 89822f5f eb5c8911
This diff is collapsed.
......@@ -28,8 +28,8 @@
}
},
"levelPrize": {
"level_90": "https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png",
"level_60": "https://img.alicdn.com/imgextra/i3/2275046294/O1CN01Llkz1U1wMhRqE4D0f_!!2275046294-2-miniprogram.png",
"level_90": "https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png",
"level_120": "https://img.alicdn.com/imgextra/i1/2275046294/O1CN01WvSfpG1wMhRrsjqFq_!!2275046294-2-miniprogram.png",
"level_30": "https://img.alicdn.com/imgextra/i3/2275046294/O1CN01Mf9wLi1wMhRoCuoOs_!!2275046294-2-miniprogram.png",
"level_10": "https://img.alicdn.com/imgextra/i3/2275046294/O1CN01bsypJm1wMhRsRMjh1_!!2275046294-2-miniprogram.png"
......
......@@ -43,77 +43,88 @@
"scores": 11111,
"stars": 1,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 2,
"scores": 22222,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 3,
"scores": 3333,
"stars": 3,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 4,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 5,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 6,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 7,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 4,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 8,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 9,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
},
{
"level": 10,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
"isVisitSuccess": true,
"sendAwardType": "prize"
}
],
"isFristLogin": false
......
......@@ -29,8 +29,12 @@
"name": "festival"
},
{
"keys": "dis_ele0_0.png,dis_ele0_1.png,dis_ele0_10.png,dis_ele0_11.png,dis_ele0_12.png,dis_ele0_13.png,dis_ele0_14.png,dis_ele0_2.png,dis_ele0_3.png,dis_ele0_4.png,dis_ele0_5.png,dis_ele0_6.png,dis_ele0_7.png,dis_ele0_8.png,dis_ele0_9.png,dis_ele1_0.png,dis_ele1_1.png,dis_ele1_10.png,dis_ele1_11.png,dis_ele1_12.png,dis_ele1_13.png,dis_ele1_14.png,dis_ele1_2.png,dis_ele1_3.png,dis_ele1_4.png,dis_ele1_5.png,dis_ele1_6.png,dis_ele1_7.png,dis_ele1_8.png,dis_ele1_9.png,dis_ele2_0.png,dis_ele2_1.png,dis_ele2_10.png,dis_ele2_11.png,dis_ele2_12.png,dis_ele2_13.png,dis_ele2_14.png,dis_ele2_2.png,dis_ele2_3.png,dis_ele2_4.png,dis_ele2_5.png,dis_ele2_6.png,dis_ele2_7.png,dis_ele2_8.png,dis_ele2_9.png,dis_ele3_.png,dis_ele3_0.png,dis_ele3_1.png,dis_ele3_10.png,dis_ele3_11.png,dis_ele3_12.png,dis_ele3_13.png,dis_ele3_14.png,dis_ele3_2.png,dis_ele3_3.png,dis_ele3_4.png,dis_ele3_6.png,dis_ele3_7.png,dis_ele3_8.png,dis_ele3_9.png,dis_ele4_0.png,dis_ele4_1.png,dis_ele4_10.png,dis_ele4_11.png,dis_ele4_12.png,dis_ele4_13.png,dis_ele4_14.png,dis_ele4_2.png,dis_ele4_3.png,dis_ele4_4.png,dis_ele4_5.png,dis_ele4_6.png,dis_ele4_7.png,dis_ele4_8.png,dis_ele4_9.png,hor_ele0_0.png,hor_ele0_1.png,hor_ele0_10.png,hor_ele0_11.png,hor_ele0_12.png,hor_ele0_13.png,hor_ele0_14.png,hor_ele0_15.png,hor_ele0_2.png,hor_ele0_3.png,hor_ele0_4.png,hor_ele0_5.png,hor_ele0_6.png,hor_ele0_7.png,hor_ele0_8.png,hor_ele0_9.png,hor_ele1_0.png,hor_ele1_1.png,hor_ele1_10.png,hor_ele1_11.png,hor_ele1_12.png,hor_ele1_13.png,hor_ele1_14.png,hor_ele1_15.png,hor_ele1_2.png,hor_ele1_3.png,hor_ele1_4.png,hor_ele1_5.png,hor_ele1_6.png,hor_ele1_7.png,hor_ele1_8.png,hor_ele1_9.png,hor_ele2_0.png,hor_ele2_1.png,hor_ele2_10.png,hor_ele2_11.png,hor_ele2_12.png,hor_ele2_13.png,hor_ele2_14.png,hor_ele2_15.png,hor_ele2_2.png,hor_ele2_3.png,hor_ele2_4.png,hor_ele2_5.png,hor_ele2_6.png,hor_ele2_7.png,hor_ele2_8.png,hor_ele2_9.png,hor_ele3_0.png,hor_ele3_1.png,hor_ele3_10.png,hor_ele3_11.png,hor_ele3_12.png,hor_ele3_13.png,hor_ele3_14.png,hor_ele3_15.png,hor_ele3_2.png,hor_ele3_3.png,hor_ele3_4.png,hor_ele3_5.png,hor_ele3_6.png,hor_ele3_7.png,hor_ele3_8.png,hor_ele3_9.png,hor_ele4_0.png,hor_ele4_1.png,hor_ele4_10.png,hor_ele4_11.png,hor_ele4_12.png,hor_ele4_13.png,hor_ele4_14.png,hor_ele4_15.png,hor_ele4_2.png,hor_ele4_3.png,hor_ele4_4.png,hor_ele4_5.png,hor_ele4_6.png,hor_ele4_7.png,hor_ele4_8.png,hor_ele4_9.png,ver_ele0_0.png,ver_ele0_1.png,ver_ele0_10.png,ver_ele0_11.png,ver_ele0_12.png,ver_ele0_13.png,ver_ele0_14.png,ver_ele0_15.png,ver_ele0_2.png,ver_ele0_3.png,ver_ele0_4.png,ver_ele0_5.png,ver_ele0_6.png,ver_ele0_7.png,ver_ele0_8.png,ver_ele0_9.png,ver_ele1_0.png,ver_ele1_1.png,ver_ele1_10.png,ver_ele1_11.png,ver_ele1_12.png,ver_ele1_13.png,ver_ele1_14.png,ver_ele1_15.png,ver_ele1_2.png,ver_ele1_3.png,ver_ele1_4.png,ver_ele1_5.png,ver_ele1_6.png,ver_ele1_7.png,ver_ele1_8.png,ver_ele1_9.png,ver_ele2_0.png,ver_ele2_1.png,ver_ele2_10.png,ver_ele2_11.png,ver_ele2_12.png,ver_ele2_13.png,ver_ele2_14.png,ver_ele2_15.png,ver_ele2_2.png,ver_ele2_3.png,ver_ele2_4.png,ver_ele2_5.png,ver_ele2_6.png,ver_ele2_7.png,ver_ele2_8.png,ver_ele2_9.png,ver_ele3_0.png,ver_ele3_1.png,ver_ele3_10.png,ver_ele3_11.png,ver_ele3_12.png,ver_ele3_13.png,ver_ele3_14.png,ver_ele3_15.png,ver_ele3_2.png,ver_ele3_3.png,ver_ele3_4.png,ver_ele3_5.png,ver_ele3_6.png,ver_ele3_7.png,ver_ele3_8.png,ver_ele3_9.png,ver_ele4_0.png,ver_ele4_1.png,ver_ele4_10.png,ver_ele4_11.png,ver_ele4_12.png,ver_ele4_13.png,ver_ele4_14.png,ver_ele4_15.png,ver_ele4_2.png,ver_ele4_3.png,ver_ele4_4.png,ver_ele4_5.png,ver_ele4_6.png,ver_ele4_7.png,ver_ele4_8.png,ver_ele4_9.png",
"name": "fiveVerHorDis"
"keys": "joinBg.png,joinBtn.png",
"name": "JoinPanel"
},
{
"keys": "体力不足Bg.png,体力不足按钮.png",
"name": "NoEnergyPanel"
},
{
"keys": "圆圈.png,开心收下.png",
......@@ -61,8 +65,8 @@
"name": "mapOwlEffect"
},
{
"keys": "map_whale_0.png,map_whale_1.png,map_whale_10.png,map_whale_11.png,map_whale_12.png,map_whale_2.png,map_whale_3.png,map_whale_4.png,map_whale_5.png,map_whale_6.png,map_whale_7.png,map_whale_8.png,map_whale_9.png",
"name": "mapWhaleEffect"
"keys": "img_0.png,img_1.png,img_10.png,img_11.png,img_12.png,img_13.png,img_14.png,img_15.png,img_16.png,img_17.png,img_18.png,img_19.png,img_2.png,img_3.png,img_4.png,img_5.png,img_6.png,img_7.png,img_8.png,img_9.png",
"name": "bonusTime"
},
{
"keys": "体力不足Bg.png,体力不足按钮.png",
......@@ -77,8 +81,8 @@
"name": "playScene"
},
{
"keys": "活动规则背景.png",
"name": "RulePanel"
"keys": "carb_arm.png,carb_body.png,carb_hand_l.png,carb_hand_r.png,fox_arm_l.png,fox_body.png,fox_head.png,fox_tail0.png,fox_tail1.png,fox_tail10.png,fox_tail11.png,fox_tail12.png,fox_tail13.png,fox_tail14.png,fox_tail2.png,fox_tail3.png,fox_tail4.png,fox_tail5.png,fox_tail6.png,fox_tail7.png,fox_tail8.png,fox_tail9.png,hommer.png,img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,img_owl.png,img_tree.png,lighting_1.png,lighting_2.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,owl_sleep.png,proDown.png,wheel.png",
"name": "loadingScene"
},
{
"keys": "star_light_0.png,star_light_1.png,star_light_10.png,star_light_11.png,star_light_12.png,star_light_13.png,star_light_14.png,star_light_15.png,star_light_2.png,star_light_3.png,star_light_4.png,star_light_5.png,star_light_6.png,star_light_7.png,star_light_8.png,star_light_9.png",
......
......@@ -29,8 +29,12 @@ export const ResJson = {
"name": "festival"
},
{
"keys": "dis_ele0_0.png,dis_ele0_1.png,dis_ele0_10.png,dis_ele0_11.png,dis_ele0_12.png,dis_ele0_13.png,dis_ele0_14.png,dis_ele0_2.png,dis_ele0_3.png,dis_ele0_4.png,dis_ele0_5.png,dis_ele0_6.png,dis_ele0_7.png,dis_ele0_8.png,dis_ele0_9.png,dis_ele1_0.png,dis_ele1_1.png,dis_ele1_10.png,dis_ele1_11.png,dis_ele1_12.png,dis_ele1_13.png,dis_ele1_14.png,dis_ele1_2.png,dis_ele1_3.png,dis_ele1_4.png,dis_ele1_5.png,dis_ele1_6.png,dis_ele1_7.png,dis_ele1_8.png,dis_ele1_9.png,dis_ele2_0.png,dis_ele2_1.png,dis_ele2_10.png,dis_ele2_11.png,dis_ele2_12.png,dis_ele2_13.png,dis_ele2_14.png,dis_ele2_2.png,dis_ele2_3.png,dis_ele2_4.png,dis_ele2_5.png,dis_ele2_6.png,dis_ele2_7.png,dis_ele2_8.png,dis_ele2_9.png,dis_ele3_.png,dis_ele3_0.png,dis_ele3_1.png,dis_ele3_10.png,dis_ele3_11.png,dis_ele3_12.png,dis_ele3_13.png,dis_ele3_14.png,dis_ele3_2.png,dis_ele3_3.png,dis_ele3_4.png,dis_ele3_6.png,dis_ele3_7.png,dis_ele3_8.png,dis_ele3_9.png,dis_ele4_0.png,dis_ele4_1.png,dis_ele4_10.png,dis_ele4_11.png,dis_ele4_12.png,dis_ele4_13.png,dis_ele4_14.png,dis_ele4_2.png,dis_ele4_3.png,dis_ele4_4.png,dis_ele4_5.png,dis_ele4_6.png,dis_ele4_7.png,dis_ele4_8.png,dis_ele4_9.png,hor_ele0_0.png,hor_ele0_1.png,hor_ele0_10.png,hor_ele0_11.png,hor_ele0_12.png,hor_ele0_13.png,hor_ele0_14.png,hor_ele0_15.png,hor_ele0_2.png,hor_ele0_3.png,hor_ele0_4.png,hor_ele0_5.png,hor_ele0_6.png,hor_ele0_7.png,hor_ele0_8.png,hor_ele0_9.png,hor_ele1_0.png,hor_ele1_1.png,hor_ele1_10.png,hor_ele1_11.png,hor_ele1_12.png,hor_ele1_13.png,hor_ele1_14.png,hor_ele1_15.png,hor_ele1_2.png,hor_ele1_3.png,hor_ele1_4.png,hor_ele1_5.png,hor_ele1_6.png,hor_ele1_7.png,hor_ele1_8.png,hor_ele1_9.png,hor_ele2_0.png,hor_ele2_1.png,hor_ele2_10.png,hor_ele2_11.png,hor_ele2_12.png,hor_ele2_13.png,hor_ele2_14.png,hor_ele2_15.png,hor_ele2_2.png,hor_ele2_3.png,hor_ele2_4.png,hor_ele2_5.png,hor_ele2_6.png,hor_ele2_7.png,hor_ele2_8.png,hor_ele2_9.png,hor_ele3_0.png,hor_ele3_1.png,hor_ele3_10.png,hor_ele3_11.png,hor_ele3_12.png,hor_ele3_13.png,hor_ele3_14.png,hor_ele3_15.png,hor_ele3_2.png,hor_ele3_3.png,hor_ele3_4.png,hor_ele3_5.png,hor_ele3_6.png,hor_ele3_7.png,hor_ele3_8.png,hor_ele3_9.png,hor_ele4_0.png,hor_ele4_1.png,hor_ele4_10.png,hor_ele4_11.png,hor_ele4_12.png,hor_ele4_13.png,hor_ele4_14.png,hor_ele4_15.png,hor_ele4_2.png,hor_ele4_3.png,hor_ele4_4.png,hor_ele4_5.png,hor_ele4_6.png,hor_ele4_7.png,hor_ele4_8.png,hor_ele4_9.png,ver_ele0_0.png,ver_ele0_1.png,ver_ele0_10.png,ver_ele0_11.png,ver_ele0_12.png,ver_ele0_13.png,ver_ele0_14.png,ver_ele0_15.png,ver_ele0_2.png,ver_ele0_3.png,ver_ele0_4.png,ver_ele0_5.png,ver_ele0_6.png,ver_ele0_7.png,ver_ele0_8.png,ver_ele0_9.png,ver_ele1_0.png,ver_ele1_1.png,ver_ele1_10.png,ver_ele1_11.png,ver_ele1_12.png,ver_ele1_13.png,ver_ele1_14.png,ver_ele1_15.png,ver_ele1_2.png,ver_ele1_3.png,ver_ele1_4.png,ver_ele1_5.png,ver_ele1_6.png,ver_ele1_7.png,ver_ele1_8.png,ver_ele1_9.png,ver_ele2_0.png,ver_ele2_1.png,ver_ele2_10.png,ver_ele2_11.png,ver_ele2_12.png,ver_ele2_13.png,ver_ele2_14.png,ver_ele2_15.png,ver_ele2_2.png,ver_ele2_3.png,ver_ele2_4.png,ver_ele2_5.png,ver_ele2_6.png,ver_ele2_7.png,ver_ele2_8.png,ver_ele2_9.png,ver_ele3_0.png,ver_ele3_1.png,ver_ele3_10.png,ver_ele3_11.png,ver_ele3_12.png,ver_ele3_13.png,ver_ele3_14.png,ver_ele3_15.png,ver_ele3_2.png,ver_ele3_3.png,ver_ele3_4.png,ver_ele3_5.png,ver_ele3_6.png,ver_ele3_7.png,ver_ele3_8.png,ver_ele3_9.png,ver_ele4_0.png,ver_ele4_1.png,ver_ele4_10.png,ver_ele4_11.png,ver_ele4_12.png,ver_ele4_13.png,ver_ele4_14.png,ver_ele4_15.png,ver_ele4_2.png,ver_ele4_3.png,ver_ele4_4.png,ver_ele4_5.png,ver_ele4_6.png,ver_ele4_7.png,ver_ele4_8.png,ver_ele4_9.png",
"name": "fiveVerHorDis"
"keys": "joinBg.png,joinBtn.png",
"name": "JoinPanel"
},
{
"keys": "体力不足Bg.png,体力不足按钮.png",
"name": "NoEnergyPanel"
},
{
"keys": "圆圈.png,开心收下.png",
......@@ -61,8 +65,8 @@ export const ResJson = {
"name": "mapOwlEffect"
},
{
"keys": "map_whale_0.png,map_whale_1.png,map_whale_10.png,map_whale_11.png,map_whale_12.png,map_whale_2.png,map_whale_3.png,map_whale_4.png,map_whale_5.png,map_whale_6.png,map_whale_7.png,map_whale_8.png,map_whale_9.png",
"name": "mapWhaleEffect"
"keys": "img_0.png,img_1.png,img_10.png,img_11.png,img_12.png,img_13.png,img_14.png,img_15.png,img_16.png,img_17.png,img_18.png,img_19.png,img_2.png,img_3.png,img_4.png,img_5.png,img_6.png,img_7.png,img_8.png,img_9.png",
"name": "bonusTime"
},
{
"keys": "体力不足Bg.png,体力不足按钮.png",
......@@ -77,8 +81,8 @@ export const ResJson = {
"name": "playScene"
},
{
"keys": "活动规则背景.png",
"name": "RulePanel"
"keys": "carb_arm.png,carb_body.png,carb_hand_l.png,carb_hand_r.png,fox_arm_l.png,fox_body.png,fox_head.png,fox_tail0.png,fox_tail1.png,fox_tail10.png,fox_tail11.png,fox_tail12.png,fox_tail13.png,fox_tail14.png,fox_tail2.png,fox_tail3.png,fox_tail4.png,fox_tail5.png,fox_tail6.png,fox_tail7.png,fox_tail8.png,fox_tail9.png,hommer.png,img_line1.png,img_line2.png,img_line3.png,img_line4.png,img_line5.png,img_owl.png,img_tree.png,lighting_1.png,lighting_2.png,loadingBg.jpg,loadingBg2.png,loadingPro0.png,loadingPro1.png,loadingPro10.png,loadingPro11.png,loadingPro2.png,loadingPro3.png,loadingPro4.png,loadingPro5.png,loadingPro6.png,loadingPro7.png,loadingPro8.png,loadingPro9.png,loadingTitle.png,owl_sleep.png,proDown.png,wheel.png",
"name": "loadingScene"
},
{
"keys": "star_light_0.png,star_light_1.png,star_light_10.png,star_light_11.png,star_light_12.png,star_light_13.png,star_light_14.png,star_light_15.png,star_light_2.png,star_light_3.png,star_light_4.png,star_light_5.png,star_light_6.png,star_light_7.png,star_light_8.png,star_light_9.png",
......
......@@ -92,7 +92,7 @@ export const SkinJson = {
{
"name": "提示文案",
"x": 210,
"y": 797,
"y": 815,
"alpha": 1,
"type": "text",
"props": {
......@@ -168,7 +168,7 @@ export const SkinJson = {
{
"name": "继续闯关小",
"x": 93,
"y": 1095,
"y": 1086,
"alpha": 1,
"type": "button",
"props": {
......@@ -179,7 +179,7 @@ export const SkinJson = {
{
"name": "去抽奖",
"x": 383,
"y": 1095,
"y": 1086,
"alpha": 1,
"type": "button",
"props": {
......@@ -223,8 +223,9 @@ export const SkinJson = {
"alpha": 1,
"type": "sprite",
"props": {
"source": "红包奖励.png"
}
"source": ""
},
"id": "prizeImg"
},
{
"name": "道具",
......@@ -233,7 +234,7 @@ export const SkinJson = {
"type": "container",
"children": [
{
"name": "圆角矩形 648",
"name": "bg",
"x": 0,
"y": 0,
"alpha": 1,
......@@ -243,7 +244,7 @@ export const SkinJson = {
}
},
{
"name": "步数道具 x1",
"name": "label",
"x": 265,
"y": 85,
"alpha": 1,
......@@ -256,7 +257,7 @@ export const SkinJson = {
}
},
{
"name": "道具",
"name": "img",
"x": 76,
"y": 24,
"alpha": 1,
......@@ -265,7 +266,8 @@ export const SkinJson = {
"source": "道具.png"
}
}
]
],
"id": "prop"
},
{
"name": "关闭按钮",
......
......@@ -45,6 +45,7 @@ export class Tools {
"level": number,
"isVisitSuccess": boolean,
"stars": number,
sendAwardType: any
}[],
"prizes": {
"receiveTime": string,//number
......@@ -107,7 +108,7 @@ export class Tools {
*/
public static consumerTools(type: PropType): Promise<boolean> {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.consumerTools, { type }, (s, res) => {
sendTbNet(TbNetName.consumerTools, {type}, (s, res) => {
if (s) {
//修改道具数量
this.gameData.tools = res.data.tools;
......@@ -170,11 +171,11 @@ export class Tools {
var tbMy = my
if (!tbMy) return;
//@ts-ignore
const { cloud } = getApp();
const {cloud} = getApp();
//测试地址//到时云存储传一个小json,,改路径
var url = "cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga";
//获取临时地址
var urls = await cloud.file.getTempFileURL({ fileId: [url] })
var urls = await cloud.file.getTempFileURL({fileId: [url]})
url = urls[0].url.replace('-internal', '');
tbMy.downloadFile({
url: url,
......@@ -183,10 +184,10 @@ export class Tools {
tbMy.getFileSystemManager().readFile({
filePath: i,
// encoding: "utf8",
success: function (r) {
success: function(r) {
},
fail: function (res) {
fail: function(res) {
}
})
......@@ -330,11 +331,11 @@ export class Tools {
showTime: number = 300
) {
Tween.get(target)
.set({ alpha: 0, visible: true })
.to({ alpha: 1 }, showTime, Ease.quadIn)
.set({alpha: 0, visible: true})
.to({alpha: 1}, showTime, Ease.quadIn)
.wait(time)
.to({ alpha: 0 }, showTime, Ease.quadOut)
.set({ alpha: 0, visible: false })
.to({alpha: 0}, showTime, Ease.quadOut)
.set({alpha: 0, visible: false})
.call(() => {
call();
});
......
......@@ -46,17 +46,22 @@ export class FailedPanel extends Panel {
}
public hidePanel() {
changeScene(MapScene, {level: this.data.level + 1});
changeScene(MapScene);
super.hidePanel();
}
public again() {
changeScene(MapScene, {level: this.data.level});
super.hidePanel();
}
initEvents() {
super.initEvents();
this.againBtn.addEventListener(MouseEvent.CLICK, this.hidePanel, this);
this.againBtn.addEventListener(MouseEvent.CLICK, this.again, this);
}
removeEvents() {
super.removeEvents();
this.againBtn.removeEventListener(MouseEvent.CLICK, this.hidePanel, this);
this.againBtn.removeEventListener(MouseEvent.CLICK, this.again, this);
}
}
......@@ -9,6 +9,8 @@ import FrameAni = FYGE.FrameAni;
import Texture = FYGE.Texture;
import { RES } from "../../module/RES";
import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls";
import { MapScene } from "../scene/map/MapScene";
export class SuccessNoPrizePanel extends Panel {
get groupNames() {
......@@ -49,6 +51,8 @@ export class SuccessNoPrizePanel extends Panel {
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.tipsTex.textAlign = TEXT_ALIGN.CENTER;
this.tipsTex.textWidth = 750;
this.tipsTex.x = 0;
this.starGroup = this.addChild(new SuccessStarGroup());
this.starGroup.position.set(373, 680);
......@@ -57,18 +61,50 @@ export class SuccessNoPrizePanel extends Panel {
this.starGroup.play(this.data.stars);
if (this.data.stars >= 3) {
if (this.data.stars >= 3) { // 达到三星
this.againBtn.visible = false;
this.continueBtn.visible = false;
} else {
} else { // 未达到三星
this.totalContinueBtn.visible = false;
}
if (MapScene.checkArr && MapScene.checkArr[this.data.level] && MapScene.checkArr[this.data.level].sendAwardType) {
// 到过三星,领过奖
const curLevel: number = Tools.gameData.currentLevel;
let upLevel: number = 120;
let dLevel: number = 120;
Tools.baseInfo.prizeLevels.forEach((value, index) => {
const d: number = value - curLevel;
if (curLevel <= value && d >= 0 && d <= dLevel) {
upLevel = value;
if (curLevel == this.data.level) {
dLevel = d + 1;
} else {
dLevel = d;
}
}
});
this.tipsTex.text = ` 太厉害了!\n再解锁${dLevel}关可以开红包了`;
this.tipsTex.textAlign = TEXT_ALIGN.CENTER;
this.tipsTex.textWidth = 750;
this.tipsTex.x = 0;
} else {
// 没到三星,没领过奖
if (this.data.isPrizeLevel) {
this.tipsTex.text = '闯关成功!挑战满星通关\n获得抽大奖机会!';
} else {
this.tipsTex.text = '闯关成功!挑战满星通关\n有概率获得随机道具一个';
}
}
}
private lightEffect() {
Tween.get(this.light1, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: 360}, 12000);
Tween.get(this.light2, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: -360}, 12000);
......@@ -89,14 +125,21 @@ export class SuccessNoPrizePanel extends Panel {
* 挑战满星
*/
private again() {
changeScene(MapScene, {level: this.data.level});
super.hidePanel();
}
/**
* 继续闯关
*/
private continue() {
changeScene(MapScene, {level: this.data.level + 1});
super.hidePanel();
}
public hidePanel() {
changeScene(MapScene);
super.hidePanel();
}
removeEvents() {
......
......@@ -4,6 +4,9 @@ import { SuccessStarGroup } from "./SuccessNoPrizePanel";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture;
import Container = FYGE.Container;
import { PropType } from "../something/enum/PropType";
export class SuccessPrizePanel extends Panel {
get groupNames() {
......@@ -32,6 +35,8 @@ export class SuccessPrizePanel extends Panel {
againBtn: FYGE.Button;
noPrizeAgainBtn: FYGE.Button;
goPrizeBtn: FYGE.Button;
prizeImg: Sprite;
prop: Container;
light1: Sprite;
light2: Sprite;
......@@ -48,9 +53,36 @@ export class SuccessPrizePanel extends Panel {
this.starGroup = this.addChild(new SuccessStarGroup());
this.starGroup.position.set(373, 678);
this.prizeImg.anchorTexture.x = 0.5;
this.prizeImg.x = 375;
this.lightEffect();
this.starGroup.play(4);
this.starGroup.play(this.data.stars);
if (this.data.tool) {
this.againBtn.visible = false;
this.goPrizeBtn.visible = false;
this.prizeImg.visible = false;
switch (this.data.tool.type) {
case PropType.BOOMS:
// boomBtn
break;
case PropType.HAMMERS:
// hammerBtn
break;
case PropType.STEPS:
// stepBtn
break;
}
} else if (this.data.prize) {
this.noPrizeAgainBtn.visible = false;
this.prop.visible = false;
this.prizeImg.texture = Texture.fromUrl(this.data.prize.image);
}
}
private lightEffect() {
......
......@@ -28,16 +28,18 @@ export default class CheckBtn extends Container {
stars: number,
isPrizeLevel: boolean,
isVisitSuccess: boolean
isPlayed: boolean
isPlayed: boolean,
} = {
level: 1,
scores: 0,
stars: 0,
isPrizeLevel: false,
isVisitSuccess: false,
isPlayed: false
isPlayed: false,
};
private _sendAwardType: any;
private btn: Button = null;
private checkLabel: TextField = null;
......@@ -59,6 +61,12 @@ export default class CheckBtn extends Container {
this.checkData = data;
this.checkData.isPlayed = true;
this._sendAwardType = data.sendAwardType;
}
public get sendAwardType() {
return this._sendAwardType;
}
private _starCount = 0;
......@@ -75,6 +83,10 @@ export default class CheckBtn extends Container {
});
}
public get starCount(): number {
return this._starCount;
}
private _enabled: boolean = true;
public set enabled(enabled: boolean) {
if (this._enabled == enabled) return;
......@@ -190,16 +202,17 @@ export default class CheckBtn extends Container {
this.enabled = false; // 先设置成关闭
// 点击事件
this.btn.addEventListener(MouseEvent.CLICK, () => {
this.btn.addEventListener(MouseEvent.CLICK, this.clickStart, this);
}
public clickStart() {
console.log(`关卡:${this.checkNum}`);
console.log(this.checkData);
this._isPrize
? showPanel(StartPanelPrize, this.checkData)
: showPanel(StartPanel, this.checkData);
}, this);
}
}
/**
......
......@@ -152,10 +152,12 @@ export class MapScene extends Scene {
MapScene.checkArr[v.level].isPrize = true;
});
this.scrollToCheck(this.data.level
? this.data.level
: currentLevel
);
if (this.data && this.data.level) {
this.scrollToCheck(this.data.level);
MapScene.checkArr[this.data.level].clickStart();
} else {
this.scrollToCheck(currentLevel);
}
}
public initMap() {
......@@ -208,13 +210,19 @@ export class MapScene extends Scene {
public start(data?: any) {
super.start(data);
// Tools.gameOver({
// level: 1,
// score: 666,
// stars: 0,
// isVisitSuccess: false,
// isPrizeLevel: false,
// });
Tools.gameOver({
level: 1,
score: 666,
stars: 3,
isVisitSuccess: true,
isPrizeLevel: true,
tool: {
type: 'STEPS',
},
// prize: {
// image: 'https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png',
// }
});
}
public initEvents() {
......
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