Commit 906def8c authored by 邱旭's avatar 邱旭

斐乐

parent b2ec1d54
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
background-color: #f5cccd; background-color: #fff;
/* background: linear-gradient(#93dbb7,#ff0,#b5d89a); */ /* background: linear-gradient(#93dbb7,#ff0,#b5d89a); */
/* background: linear-gradient(#93dbb7,#b5d89a); */ /* background: linear-gradient(#93dbb7,#b5d89a); */
} }
......
{ {
"code": "000000", "code": "000000",
"data": { "data": {
"currentLevel": 118, "currentLevel": 13,
"visitors": [ "visitors": [
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 57340,
"level": 107,
"createTime": 1596426790338,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596426790338,
"_id": "5f278a26964f9706aa6a0f6a",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 61920,
"level": 90,
"createTime": 1596426870046,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596426967833,
"_id": "5f278a7675cfb6d7c12b4a34",
"stars": 3,
"isPrizeLevel": true,
"sendAwardType": "prize"
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 71960,
"level": 30,
"createTime": 1596167666174,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596167666174,
"_id": "5f2395f275cfb6d7c120368e",
"stars": 3,
"isPrizeLevel": true,
"sendAwardType": "prize"
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 33790,
"level": 29,
"createTime": 1596167581587,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596167581587,
"_id": "5f23959d964f9706aa5eee7c",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 22440,
"level": 28,
"createTime": 1596097857555,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097857555,
"_id": "5f228541738989c8b3f71b0e",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 61340,
"level": 27,
"createTime": 1596097814868,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097814868,
"_id": "5f228516ef5071ef853e122c",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 43200,
"level": 26,
"createTime": 1596097739299,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097739299,
"_id": "5f2284cb9897b44ce1d55d80",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 35330,
"level": 25,
"createTime": 1596097712583,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisi tSuccess": true,
"updateTime": 1596097712583,
"_id": "5f2284b0c3ad349c09931d20",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 19030,
"level": 24,
"createTime": 1596097640984,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097640984,
"_id": "5f2284689da6714ab7da8001",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 10490,
"level": 23,
"createTime": 1596097504126,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097504126,
"_id": "5f2283e0738989c8b3f71299",
"stars": 2,
"isPrizeLevel": false,
"sendAwardType": ""
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 36280,
"level": 22,
"createTime": 1596097409349,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097409349,
"_id": "5f228381114fbb8f6d236f6c",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 164350,
"level": 21,
"createTime": 1596097323573,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097323573,
"_id": "5f22832b114fbb8f6d236d98",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 29280,
"level": 20,
"createTime": 1596097265605,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097265605,
"_id": "5f2282f1738989c8b3f70d99",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 51060,
"level": 19,
"createTime": 1596097204199,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097204199,
"_id": "5f2282b375cfb6d7c11de506",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 57090,
"level": 18,
"createTime": 1596097156455,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097156455,
"_id": "5f228284ef5071ef853e032d",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 40860,
"level": 17,
"createTime": 1596090162290,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596097074636,
"_id": "5f22673267f13766547b9efb",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 50350,
"level": 16,
"createTime": 1596090092557,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596090092557,
"_id": "5f2266ece5c0d7361f1f00d9",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 46920,
"level": 15,
"createTime": 1596019074167,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596019074167,
"_id": "5f2151829da6714ab7d807a9",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{
"activityId": "5f213ff79897b44ce1d2925d",
"score": 35630,
"level": 14,
"createTime": 1596018897035,
"openId": "AAFgCvE-ALiIWXYsJuSLKdVt",
"isVisitSuccess": true,
"updateTime": 1596018897035,
"_id": "5f2150d1086e654a41691f2d",
"stars": 3,
"isPrizeLevel": false,
"sendAwardType": true
},
{ {
"activityId": "5f213ff79897b44ce1d2925d", "activityId": "5f213ff79897b44ce1d2925d",
"score": 48950, "score": 48950,
......
{ {
"code": "000000", "code": "000000",
"data": { "data": {
"currentLevel": 6, "currentLevel": 16,
"isFristLogin": false, "isFristLogin": false,
"visitors": [ "visitors": [
{ {
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"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", "keys": "loadingBg.jpg,loadingPro.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"name": "lotteryScene" "name": "lotteryScene"
}, },
{ {
"keys": "appointCountBg.png,cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,loopMsgBg.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,remindIcon.png,water1.png,water2.png", "keys": "guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_0.png,map_check_1.png,map_check_2.png,map_check_3.png,map_check_4.png,map_check_5.png,map_check_6.png,map_check_7.png,map_check_8.png,map_check_9.png,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_energyBg.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,remindIcon.png",
"name": "map" "name": "map"
}, },
{ {
......
...@@ -44,7 +44,7 @@ export class Main { ...@@ -44,7 +44,7 @@ export class Main {
1624,//设计高度 1624,//设计高度
sysInfo && sysInfo.windowWidth || document.body.clientWidth, sysInfo && sysInfo.windowWidth || document.body.clientWidth,
sysInfo && sysInfo.windowHeight || document.body.clientHeight, sysInfo && sysInfo.windowHeight || document.body.clientHeight,
FYGE.RENDERER_TYPE.CANVAS FYGE.RENDERER_TYPE.CANVAS, true
); );
this.stage = stage; this.stage = stage;
this.canvas = canvas;//赋值下,为了下面的destroy的cancelAnimationFrame this.canvas = canvas;//赋值下,为了下面的destroy的cancelAnimationFrame
......
...@@ -85,7 +85,7 @@ export const ResJson = { ...@@ -85,7 +85,7 @@ export const ResJson = {
"name": "fiveVerHorDis" "name": "fiveVerHorDis"
}, },
{ {
"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", "keys": "loadingBg.jpg,loadingPro.png",
"name": "loadingScene" "name": "loadingScene"
}, },
{ {
...@@ -93,7 +93,7 @@ export const ResJson = { ...@@ -93,7 +93,7 @@ export const ResJson = {
"name": "lotteryScene" "name": "lotteryScene"
}, },
{ {
"keys": "appointCountBg.png,cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,loopMsgBg.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,remindIcon.png,water1.png,water2.png", "keys": "guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_0.png,map_check_1.png,map_check_2.png,map_check_3.png,map_check_4.png,map_check_5.png,map_check_6.png,map_check_7.png,map_check_8.png,map_check_9.png,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_energyBg.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,remindIcon.png",
"name": "map" "name": "map"
}, },
{ {
......
...@@ -385,8 +385,8 @@ export class Tools { ...@@ -385,8 +385,8 @@ export class Tools {
* @param name * @param name
*/ */
public static getNumTextures(name: string): { [key: number]: FYGE.Texture } { public static getNumTextures(name: string): { [key: number]: FYGE.Texture } {
var arr = {} const arr = {};
for (var i = 0; i <= 9; i++) arr[i] = RES.getRes(name + i + ".png") for (let i = 0; i <= 9; i++) arr[i] = RES.getRes(name + i + ".png")
return arr return arr
} }
} }
export const loading_animal = {
"v": "5.6.10",
"fr": 30,
"ip": 0,
"op": 60,
"w": 750,
"h": 1624,
"nm": "loading_animal",
"layers": [
{
"ind": 1,
"ty": 2,
"nm": "owl_sleep.png",
"parent": 2,
"refId": "image_0",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
{
"t": 15,
"s": [
41.002,
21.5,
0
]
},
{
"t": 42,
"s": [
41.115,
27.521,
0
]
}
]
},
"a": {
"a": 0,
"k": [
26,
9.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 15,
"op": 42
},
{
"ind": 2,
"ty": 2,
"nm": "img_owl.png",
"refId": "image_1",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 12,
"s": [
0
]
},
{
"t": 42,
"s": [
-6
]
},
{
"t": 48,
"s": [
6
]
},
{
"t": 54,
"s": [
-2
]
},
{
"t": 60,
"s": [
0
]
}
]
},
"p": {
"a": 1,
"k": [
{
"t": 42,
"s": [
679.5,
559,
0
]
},
{
"t": 45,
"s": [
679.5,
547,
0
]
},
{
"t": 48,
"s": [
679.5,
559,
0
]
}
]
},
"a": {
"a": 0,
"k": [
48,
110.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 3,
"ty": 2,
"nm": "img_tree.png",
"refId": "image_2",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 42,
"s": [
0
]
},
{
"t": 45,
"s": [
-2
]
},
{
"t": 48,
"s": [
0
]
}
]
},
"p": {
"a": 0,
"k": [
739,
566.5,
0
]
},
"a": {
"a": 0,
"k": [
150,
29.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 4,
"ty": 2,
"nm": "fox_head.png",
"parent": 6,
"refId": "image_3",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 0,
"k": [
87.5,
-4,
0
]
},
"a": {
"a": 0,
"k": [
206,
250.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 5,
"ty": 2,
"nm": "hommer.png",
"parent": 6,
"refId": "image_4",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 0,
"s": [
-6
]
},
{
"t": 40,
"s": [
-6
]
},
{
"t": 45,
"s": [
6
]
},
{
"t": 50,
"s": [
-6
]
},
{
"t": 55,
"s": [
6
]
},
{
"t": 60,
"s": [
-6
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('cycle', 0);"
},
"p": {
"a": 0,
"k": [
143,
32,
0
]
},
"a": {
"a": 0,
"k": [
29.5,
201.5,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 6,
"ty": 2,
"nm": "fox_body.png",
"refId": "image_5",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 0,
"s": [
-1
]
},
{
"t": 15,
"s": [
1
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"p": {
"a": 0,
"k": [
356,
992,
0
]
},
"a": {
"a": 0,
"k": [
85,
206,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 7,
"ty": 2,
"nm": "fox_arm_l.png",
"parent": 6,
"refId": "image_6",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 0,
"s": [
2
]
},
{
"t": 40,
"s": [
2
]
},
{
"t": 45,
"s": [
-6
]
},
{
"t": 50,
"s": [
2
]
},
{
"t": 55,
"s": [
-6
]
},
{
"t": 60,
"s": [
2
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('cycle', 0);"
},
"p": {
"a": 0,
"k": [
45,
44,
0
]
},
"a": {
"a": 0,
"k": [
116,
32,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 9,
"ty": 2,
"nm": "carb_hand_r.png",
"parent": 10,
"refId": "image_8",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 1,
"k": [
{
"t": 0,
"s": [
8.75,
18,
0
]
},
{
"t": 15,
"s": [
4.25,
8,
0
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"a": {
"a": 0,
"k": [
17.5,
42.25,
0
]
},
"s": {
"a": 1,
"k": [
{
"t": 0,
"s": [
-100,
100,
100
]
},
{
"t": 15,
"s": [
-95,
95,
100
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
}
},
"ip": 0,
"op": 180
},
{
"ind": 10,
"ty": 2,
"nm": "carb_arm.png",
"parent": 13,
"refId": "image_9",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 1,
"k": [
{
"t": 0,
"s": [
107,
46.75,
0
]
},
{
"t": 15,
"s": [
101,
32.25,
0
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"a": {
"a": 0,
"k": [
12.75,
18,
0
]
},
"s": {
"a": 0,
"k": [
-100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 11,
"ty": 2,
"nm": "carb_hand_l.png",
"parent": 12,
"refId": "image_10",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 1,
"k": [
{
"t": 0,
"s": [
5.75,
3.5,
0
]
},
{
"t": 15,
"s": [
10.75,
16,
0
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"a": {
"a": 0,
"k": [
26.5,
39.25,
0
]
},
"s": {
"a": 1,
"k": [
{
"t": 0,
"s": [
100,
100,
100
]
},
{
"t": 15,
"s": [
105,
105,
100
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
}
},
"ip": 0,
"op": 180
},
{
"ind": 12,
"ty": 2,
"nm": "carb_arm.png",
"parent": 13,
"refId": "image_9",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 0,
"k": 0
},
"p": {
"a": 1,
"k": [
{
"t": 0,
"s": [
28,
31.75,
0
]
},
{
"t": 15,
"s": [
23,
45.75,
0
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"a": {
"a": 0,
"k": [
12.5,
17.75,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
},
{
"ind": 13,
"ty": 2,
"nm": "carb_body.png",
"refId": "image_11",
"ks": {
"o": {
"a": 0,
"k": 100
},
"r": {
"a": 1,
"k": [
{
"t": 0,
"s": [
0
]
},
{
"t": 15,
"s": [
-2
]
}
],
"x": "var $bm_rt;\n$bm_rt = loopOut('pingpong', 0);"
},
"p": {
"a": 0,
"k": [
566.5,
1031,
0
]
},
"a": {
"a": 0,
"k": [
64.5,
93,
0
]
},
"s": {
"a": 0,
"k": [
100,
100,
100
]
}
},
"ip": 0,
"op": 180
}
],
"markers": []
}
\ No newline at end of file
...@@ -3,13 +3,9 @@ import { Tools } from "../Tools"; ...@@ -3,13 +3,9 @@ import { Tools } from "../Tools";
import { ProgressBarS } from "../common/ProgressBarS"; import { ProgressBarS } from "../common/ProgressBarS";
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import { sendTbNet, TbNetName, getTbData } from "../TaoBaoNet"; import { sendTbNet, TbNetName, getTbData } from "../TaoBaoNet";
import { changeScene } from "../../module/ctrls";
import { MapScene } from "./map/MapScene";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { GTool } from "../../module/tools/GTool"; import { MapScene } from "./map/MapScene";
import { Lottie } from "../Lottie"; import { changeScene } from "../../module/ctrls";
import { loading_animal } from "../lotties/loading_animal";
import { LotteryScene } from "./LotteryScene";
export class LoadingScene extends Scene { export class LoadingScene extends Scene {
get groupNames() { get groupNames() {
...@@ -20,87 +16,21 @@ export class LoadingScene extends Scene { ...@@ -20,87 +16,21 @@ export class LoadingScene extends Scene {
initUi() { initUi() {
//适配 //适配
this.y = -layers.stageOffsetY this.y = -layers.stageOffsetY;
//背景 //背景
this.addChild(FYGE.Sprite.fromFrame("loadingBg.jpg")) this.addChild(FYGE.Sprite.fromFrame("loadingBg.jpg"))
//光
var l1 = this.addChild(FYGE.Sprite.fromFrame("lighting_1.png"))
l1.position.set(543, 765)
var l2 = this.addChild(FYGE.Sprite.fromFrame("lighting_2.png"))
l2.position.set(545, 765)
l2.visible = false;
FYGE.Tween.get(l1, {loop: true})
.wait(500)
.call(() => {
l1.visible = !l1.visible
})
FYGE.Tween.get(l2, {loop: true})
.wait(500)
.call(() => {
l2.visible = !l2.visible
})
// console.log(a.position,b.position)
//摩天轮
var wheel = this.addChild(FYGE.Sprite.fromFrame("wheel.png"))
.addEventListener(FYGE.Event.ENTER_FRAME, () => {
wheel.rotation += 0.3
})
wheel.anchorTexture.set(0.5, 0.5);
wheel.position.set(50, 780)
wheel.alpha = 0.3;
//背景2
this.addChild(FYGE.Sprite.fromFrame("loadingBg2.png"))
//进度条底图
this.addChild(FYGE.Sprite.fromFrame("proDown.png"))
.position.set((750 - 577) / 2, 1288 - 24)
//进度条帧动画 //进度条帧动画
var arr = []; const pro = this.addChild(Tools.getSprite('loadingPro.png'));
for (var i = 0; i <= 11; i++) arr.push(RES.getRes("loadingPro" + i + ".png")) pro.position.set(80, 768)//位置按正常满条的位置
var pro = this.addChild(new FYGE.FrameAni(arr));
pro.play(0)
pro.position.set(375, 1288)//位置按正常满条的位置
//@ts-ignore 进度条托管 //@ts-ignore 进度条托管
this.progressBar = new ProgressBarS(pro); this.progressBar = new ProgressBarS(pro);
//动画
var l = this.addChild(new Lottie(loading_animal))
l.play(0)
//尾巴
var foxTail = new FYGE.FrameAni((() => {
var arrFox = [];
var count = -1;
while (++count <= 14) arrFox.push(RES.getRes("fox_tail" + count + ".png"))
return arrFox
})())
foxTail.play(0);
l.getChildByName("fox_body.png", true, true)
.addChildAt(foxTail, 0)
.position.set(250, 0)
//标题
this.addChild(new Title())
//提示文案,随机文案待定
this.addChild(Tools.getText(
GTool.randomT([
"提示:固定关卡可抽取通关奖励哟!",
"开心趣消消,烦恼全抛掉!",
"解锁120关,最高可得TF彩妆礼盒、\nDyson吹风机!"
]),
28,
"#ae3830",
FYGE.TEXT_ALIGN.CENTER,
500,
(750 - 500) / 2,
1288 - 24 + 18 + 48
))
} }
async start() { async start() {
super.start() super.start()
// 访问页面埋点
sendTbNet(TbNetName.reportAnalytics, {logkey: 'visit'});
this.addEventListener(FYGE.Event.PROGRESS, this.progressEvent, this) this.addEventListener(FYGE.Event.PROGRESS, this.progressEvent, this)
//首次进度一点 //首次进度一点
this.dispatchEvent(FYGE.Event.PROGRESS, 0.2) this.dispatchEvent(FYGE.Event.PROGRESS, 0.2)
...@@ -108,13 +38,15 @@ export class LoadingScene extends Scene { ...@@ -108,13 +38,15 @@ export class LoadingScene extends Scene {
//获取app数据 //获取app数据
const {data} = await sendTbNet(TbNetName.getAppData); const {data} = await sendTbNet(TbNetName.getAppData);
Tools.globalData = data; Tools.globalData = data;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3) this.dispatchEvent(FYGE.Event.PROGRESS, 0.3);
//询问读取权限,不阻止进程 //询问读取权限,不阻止进程
// Tools.checkPermission();//这个需要吗? // Tools.checkPermission();//这个需要吗?
//获取首页数据 //获取首页数据
var getIndexSuccesss = await Tools.getIndex() const indexSuccess = await Tools.getIndex();
//失败不进入 //失败不进入
if (!getIndexSuccesss) return; if (!indexSuccess) return;
this.dispatchEvent(FYGE.Event.PROGRESS, 0.3); this.dispatchEvent(FYGE.Event.PROGRESS, 0.3);
//赋值openId,取getIndex里的数据 //赋值openId,取getIndex里的数据
...@@ -143,16 +75,11 @@ export class LoadingScene extends Scene { ...@@ -143,16 +75,11 @@ export class LoadingScene extends Scene {
// ].map((e) => { // ].map((e) => {
// return RES.loadGroup(e) // return RES.loadGroup(e)
// })) // }))
await RES.loadGroup("map") await RES.loadGroup("map");
this.dispatchEvent(FYGE.Event.PROGRESS, 0.6); this.dispatchEvent(FYGE.Event.PROGRESS, 0.6);
await RES.loadGroup("mapCrabEffect")
this.dispatchEvent(FYGE.Event.PROGRESS, 0.7); this.dispatchEvent(FYGE.Event.PROGRESS, 0.7);
await RES.loadGroup("mapOwlEffect")
this.dispatchEvent(FYGE.Event.PROGRESS, 0.8); this.dispatchEvent(FYGE.Event.PROGRESS, 0.8);
await RES.loadGroup("mapWhaleEffect")
this.dispatchEvent(FYGE.Event.PROGRESS, 0.9); this.dispatchEvent(FYGE.Event.PROGRESS, 0.9);
await RES.loadGroup("mapCheckPrizeEffect")
this.dispatchEvent(FYGE.Event.PROGRESS, 1); this.dispatchEvent(FYGE.Event.PROGRESS, 1);
} }
...@@ -161,7 +88,7 @@ export class LoadingScene extends Scene { ...@@ -161,7 +88,7 @@ export class LoadingScene extends Scene {
progressEvent(e: FYGE.Event) { progressEvent(e: FYGE.Event) {
let pro = e.data; let pro = e.data;
FYGE.Tween.get(this.progressBar, null, null, true) FYGE.Tween.get(this.progressBar, null, null, true)
.to({value: pro}, 2000/**(p-this.lastP)*/) .to({value: pro}, 0/**(p-this.lastP)*/)
.call(() => { .call(() => {
if (pro >= 1) { if (pro >= 1) {
this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this); this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this);
...@@ -180,72 +107,4 @@ export class LoadingScene extends Scene { ...@@ -180,72 +107,4 @@ export class LoadingScene extends Scene {
} }
} }
const lingConfig = [
{
"name": "img_line1",
"x": 0,
"y": 70,
},
{
"name": "img_line2",
"x": 85,
"y": 50,
},
{
"name": "img_line3",
"x": 195,
"y": 0,
},
{
"name": "img_line4",
"x": 322,
"y": 50,
},
{
"name": "img_line5",
"x": 402,
"y": 70,
}
]
class Title extends FYGE.Container {
constructor() {
super();
//线
var line = this.addChild(new FYGE.Container());
for (var i = 0; i < lingConfig.length; i++) {
var c = lingConfig[i]
line.addChild(FYGE.Sprite.fromFrame(c.name + ".png"))
.position.set(c.x, c.y);
}
line.anchor.set(433 / 2, 0);
line.scaleY = 0.18
//标题
var title = line.addChild(FYGE.Sprite.fromFrame("loadingTitle.png"))
title.position.set(-33, 313)
title.anchor.set(494 / 2, 40);
this.x = 160//待调整
var targetY = -80
this.y = -560;//待调整
//新建就动画出现吧,
FYGE.Tween.get(this)
.to({y: targetY + 25}, 300)
.to({y: targetY - 30}, 100)
.to({y: targetY}, 100);
[line, title].forEach((e) => {
FYGE.Tween.get(e)
.to({rotation: 1.5}, 300)
.to({rotation: -0.5}, 100)
.to({rotation: 0}, 100)
if (e === line) {
FYGE.Tween.get(e)
.to({scaleY: 1.05}, 300)
.to({scaleY: 0.96}, 100)
.to({scaleY: 1}, 100)
}
})
}
}
...@@ -3,9 +3,7 @@ import { RES } from "../../../module/RES"; ...@@ -3,9 +3,7 @@ import { RES } from "../../../module/RES";
import Container = FYGE.Container; import Container = FYGE.Container;
import Sprite = FYGE.Sprite; import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import TextField = FYGE.TextField;
import { Tools } from "../../Tools"; import { Tools } from "../../Tools";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import Point = FYGE.Point; import Point = FYGE.Point;
import FrameAni = FYGE.FrameAni; import FrameAni = FYGE.FrameAni;
...@@ -13,6 +11,7 @@ import Tween = FYGE.Tween; ...@@ -13,6 +11,7 @@ import Tween = FYGE.Tween;
import { showPanel } from "../../../module/ctrls"; import { showPanel } from "../../../module/ctrls";
import { StartPanel } from "../../panels/StartPanel"; import { StartPanel } from "../../panels/StartPanel";
import { StartPanelPrize } from "../../panels/StartPanelPrize"; import { StartPanelPrize } from "../../panels/StartPanelPrize";
import BitmapText = FYGE.BitmapText;
export enum CHECK_TYPE { export enum CHECK_TYPE {
COM, // 普通 COM, // 普通
...@@ -40,15 +39,13 @@ export default class CheckBtn extends Container { ...@@ -40,15 +39,13 @@ export default class CheckBtn extends Container {
private _sendAwardType: any; private _sendAwardType: any;
private btn: Button = null; private btn: Button = null;
private checkLabel: TextField = null; private checkTxt: BitmapText = null;
private star: CheckStar[] = null; private star: CheckStar[] = null;
private prizeAnim: FrameAni = null; private prizeAnim: FrameAni = null;
private curAnim: FrameAni = null;
private checkNum: number = null; private checkNum: number = null;
private checkCurEffect: CheckCurEffect = null;
private _data: any = null; private _data: any = null;
public set data(data) { public set data(data) {
...@@ -94,22 +91,7 @@ export default class CheckBtn extends Container { ...@@ -94,22 +91,7 @@ export default class CheckBtn extends Container {
this.btn.enabled = enabled; this.btn.enabled = enabled;
this.star.forEach(v => v.visible = enabled); this.star.forEach(v => v.visible = enabled);
this.checkLabel.visible = enabled; this.checkTxt.visible = enabled;
if (!enabled && this._isPrize) {
!this.prizeAnim.parent && this.addChild(this.prizeAnim);
}
}
// 是不是奖励关卡
private _isPrize: boolean = false;
public set isPrize(isPrize: boolean) {
if (isPrize == this._isPrize) return;
this._isPrize = isPrize;
if (this._isPrize && !this._enabled) {
!this.prizeAnim.parent && this.addChild(this.prizeAnim);
} else {
this.prizeAnim.parent && this.prizeAnim.parent.removeChild(this.prizeAnim);
}
} }
// 按钮类型 // 按钮类型
...@@ -124,10 +106,6 @@ export default class CheckBtn extends Container { ...@@ -124,10 +106,6 @@ export default class CheckBtn extends Container {
RES.getRes('map_check_enable.png'), RES.getRes('map_check_enable.png'),
RES.getRes('map_check_enable.png'), RES.getRes('map_check_enable.png'),
RES.getRes('map_check_disable.png')); RES.getRes('map_check_disable.png'));
this.checkLabel.strokeColor = '#316ec6';
this.checkCurEffect.visible = false;
this.checkCurEffect.stop();
break; break;
case CHECK_TYPE.CUR: case CHECK_TYPE.CUR:
...@@ -135,10 +113,6 @@ export default class CheckBtn extends Container { ...@@ -135,10 +113,6 @@ export default class CheckBtn extends Container {
RES.getRes('map_check_enable_cur.png'), RES.getRes('map_check_enable_cur.png'),
RES.getRes('map_check_enable_cur.png'), RES.getRes('map_check_enable_cur.png'),
RES.getRes('map_check_disable.png')); RES.getRes('map_check_disable.png'));
this.checkLabel.strokeColor = '#a55507';
this.checkCurEffect.visible = true;
this.checkCurEffect.play();
break; break;
} }
} }
...@@ -178,26 +152,22 @@ export default class CheckBtn extends Container { ...@@ -178,26 +152,22 @@ export default class CheckBtn extends Container {
// 三个星星 // 三个星星
const star1 = this.addChild(new CheckStar()); const star1 = this.addChild(new CheckStar());
star1.position.set(16.5, 83); star1.position.set(13, 107);
star1.rotation = 10;
const star2 = this.addChild(new CheckStar()); const star2 = this.addChild(new CheckStar());
star2.position.set(42.5, 90); star2.position.set(60, 112);
const star3 = this.addChild(new CheckStar()); const star3 = this.addChild(new CheckStar());
star3.position.set(67.5, 83); star3.position.set(105, 107);
star3.rotation = -10;
this.star = [star1, star2, star3]; this.star = [star1, star2, star3];
// 关卡文字 // 关卡文字
this.checkNum = data.check; this.checkNum = data.check;
this.checkData.level = data.check; this.checkData.level = data.check;
this.checkLabel = this.btn.addChild(Tools.getText(
data.check, 30, '#ffffff',
TEXT_ALIGN.CENTER, 90, 8, 33
));
this.checkLabel.stroke = 2;
this.checkLabel.strokeColor = '#316ec6';
// 当前关卡动画 this.checkTxt = this.btn.addChild(new BitmapText(Tools.getNumTextures('map_check_')));
this.checkCurEffect = this.addChild(new CheckCurEffect()); this.checkTxt.position.set(79, 61);
this.checkCurEffect.visible = false; this.checkTxt.text = data.check + '';
this.enabled = false; // 先设置成关闭 this.enabled = false; // 先设置成关闭
...@@ -209,9 +179,7 @@ export default class CheckBtn extends Container { ...@@ -209,9 +179,7 @@ export default class CheckBtn extends Container {
public clickStart() { public clickStart() {
console.log(`关卡:${this.checkNum}`); console.log(`关卡:${this.checkNum}`);
console.log(this.checkData); console.log(this.checkData);
this._isPrize showPanel(StartPanelPrize, this.checkData);
? showPanel(StartPanelPrize, this.checkData)
: showPanel(StartPanel, this.checkData);
} }
} }
...@@ -234,65 +202,9 @@ class CheckStar extends Sprite { ...@@ -234,65 +202,9 @@ class CheckStar extends Sprite {
super(RES.getRes('map_star_disable.png')); super(RES.getRes('map_star_disable.png'));
CheckStar.starDisableTexture = RES.getRes('map_star_disable.png'); CheckStar.starDisableTexture = RES.getRes('map_star_disable.png');
CheckStar.starEnableTexture = RES.getRes('map_star_enable.png'); CheckStar.starEnableTexture = RES.getRes('map_star_enable.png');
}
} this.anchor.set(23, 21);
/**
* 当前关卡的动画
*/
class CheckCurEffect extends Container {
private light1: Sprite = null;
private light2: Sprite = null;
constructor() {
super();
this.light1 = this.addChild(Tools.getSprite('cur_light_1.png'));
this.light2 = this.addChild(Tools.getSprite('cur_light_2.png'));
this.light1.anchorTexture.set(0.5, 0.5);
this.light2.anchorTexture.set(0.5, 0.5);
this.position.set(55, 50);
this.mouseEnable = this.mouseChildren = false;
}
public play() {
Tween.get(this.light1, {loop: true})
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1.5, scaleY: 1.5}, 1300)
.wait(700);
Tween.get(this.light1, {loop: true})
.set({alpha: 1})
.wait(700)
// .to({alpha: 1}, 700)
.to({alpha: 0}, 600)
.wait(700)
Tween.get(this.light2, {loop: true})
.set({scaleX: 0.8, scaleY: 0.8})
.to({scaleX: 1.3, scaleY: 1.3}, 1000)
.wait(1000);
Tween.get(this.light2, {loop: true})
.set({alpha: 0})
.to({alpha: 1}, 400)
.to({alpha: 0}, 600)
.wait(1000);
return this;
}
public stop() {
Tween.removeTweens(this.light1);
Tween.removeTweens(this.light2);
return this;
} }
} }
...@@ -14,7 +14,7 @@ export default class MapMid extends MapPart { ...@@ -14,7 +14,7 @@ export default class MapMid extends MapPart {
[357, 1053], [357, 1053],
[146, 652], [146, 652],
[287, 281], [287, 281],
[63, 412], [412, 63],
]; ];
constructor(data) { constructor(data) {
......
...@@ -17,8 +17,6 @@ import { showPanel, showToast } from "../../../module/ctrls"; ...@@ -17,8 +17,6 @@ import { showPanel, showToast } from "../../../module/ctrls";
import { FreePowerPanel } from "../../panels/FreePowerPanel"; import { FreePowerPanel } from "../../panels/FreePowerPanel";
import { PrizePanel } from "../../panels/PrizePanel"; import { PrizePanel } from "../../panels/PrizePanel";
import { GTool } from "../../../module/tools/GTool"; import { GTool } from "../../../module/tools/GTool";
import { NoPrizePanel } from "../../panels/NoPrizePanel";
import { WxPrizePanel } from "../../panels/WxPrizePanel";
export class MapScene extends Scene { export class MapScene extends Scene {
private mapContainer: Container = null; private mapContainer: Container = null;
...@@ -33,8 +31,6 @@ export class MapScene extends Scene { ...@@ -33,8 +31,6 @@ export class MapScene extends Scene {
private uiLayer: MapUI = null; private uiLayer: MapUI = null;
// private mapAvatar: MapAvatar = null;
public get groupNames(): string[] { public get groupNames(): string[] {
return [ return [
'map', 'map',
...@@ -100,7 +96,6 @@ export class MapScene extends Scene { ...@@ -100,7 +96,6 @@ export class MapScene extends Scene {
guide_check.enabled = true; guide_check.enabled = true;
guide_check.type = CHECK_TYPE.CUR; guide_check.type = CHECK_TYPE.CUR;
guide_check.position.set(MapScene.checkArr[1].x, layers.stageHeight - 162); guide_check.position.set(MapScene.checkArr[1].x, layers.stageHeight - 162);
// guide_check.addChild(new MapAvatar());
const guide_hand = guide.addChild(Tools.getSprite('guide_hand.png')); const guide_hand = guide.addChild(Tools.getSprite('guide_hand.png'));
guide_hand.position.set(guide_check.x + 90, guide_check.y + 40); guide_hand.position.set(guide_check.x + 90, guide_check.y + 40);
...@@ -151,9 +146,6 @@ export class MapScene extends Scene { ...@@ -151,9 +146,6 @@ export class MapScene extends Scene {
if (currentLevel < 100 && currentLevel > 0) { if (currentLevel < 100 && currentLevel > 0) {
MapScene.checkArr[currentLevel].type = CHECK_TYPE.CUR; MapScene.checkArr[currentLevel].type = CHECK_TYPE.CUR;
MapScene.checkArr[currentLevel].enabled = true; MapScene.checkArr[currentLevel].enabled = true;
// !this.mapAvatar && (this.mapAvatar = this.addChild(new MapAvatar()));
// this.mapAvatar.parent && this.mapAvatar.parent.removeChild(this.mapAvatar);
// MapScene.checkArr[currentLevel].addChild(this.mapAvatar);
} }
// 未通关的 // 未通关的
...@@ -167,11 +159,6 @@ export class MapScene extends Scene { ...@@ -167,11 +159,6 @@ export class MapScene extends Scene {
MapScene.checkArr[v.level].data = v; MapScene.checkArr[v.level].data = v;
}); });
// 奖励关卡
Tools.baseInfo.prizeLevels.forEach((v) => {
MapScene.checkArr[v].isPrize = true;
});
if (this.data && this.data.level) { if (this.data && this.data.level) {
this.scrollToCheck(this.data.level); this.scrollToCheck(this.data.level);
MapScene.checkArr[this.data.level].clickStart(); MapScene.checkArr[this.data.level].clickStart();
...@@ -258,31 +245,3 @@ export class MapScene extends Scene { ...@@ -258,31 +245,3 @@ export class MapScene extends Scene {
} }
} }
/**
* 地图上的头像
*/
export class MapAvatar extends Container {
private avatarImg: Sprite = null;
constructor() {
super();
this.addChild(Tools.getSprite('map_avatar_bg.png'))
.anchorTexture.set(0.5, 1);
this.position.set(54, 28);
this.mouseChildren = this.mouseEnable = false;
const mask = this.addChild(new Graphics());
mask.drawCircle(0, -58, 38);
this.avatarImg = this.addChild(new Sprite(Texture.fromUrl(
Tools.globalData.avatar
)));
this.avatarImg.width = this.avatarImg.height = 76;
this.avatarImg.position.set(-38, -96);
this.avatarImg.mask = mask;
}
}
import Container = FYGE.Container; import Container = FYGE.Container;
import Button = FYGE.Button; import Button = FYGE.Button;
import TextField = FYGE.TextField; import TextField = FYGE.TextField;
import Sprite = FYGE.Sprite;
import TEXT_ALIGN = FYGE.TEXT_ALIGN; import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import { RES } from "../../../module/RES"; import { RES } from "../../../module/RES";
import { Tools } from "../../Tools"; import { Tools } from "../../Tools";
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import { showPanel, changeScene, showToast } from "../../../module/ctrls"; import { showPanel } from "../../../module/ctrls";
import { RulePanel } from "../../panels/RulePanel"; import { RulePanel } from "../../panels/RulePanel";
import { BuyPowerPanel } from "../../panels/BuyPowerPanel";
import { TaskPanel } from "../../panels/TaskPanel"; import { TaskPanel } from "../../panels/TaskPanel";
import { getTbData, sendTbNet, TbNetName } from "../../TaoBaoNet"; import { sendTbNet, TbNetName } from "../../TaoBaoNet";
import Texture = FYGE.Texture;
import { LotteryScene } from "../LotteryScene";
import { GDispatcher } from "../../Main";
import { G_EVENT } from "../../common/G_EVENT";
import Tween = FYGE.Tween;
import { layers } from "../../../module/views/layers";
export default class MapUI extends Container { export default class MapUI extends Container {
public energyBox: EnergyBox = null; public energyBox: EnergyBox = null;
...@@ -76,6 +68,7 @@ export default class MapUI extends Container { ...@@ -76,6 +68,7 @@ export default class MapUI extends Container {
// 我的奖品 // 我的奖品
this.myPrizeBtn = this.addChild(new Button(RES.getRes('map_prizeBtn.png'))); this.myPrizeBtn = this.addChild(new Button(RES.getRes('map_prizeBtn.png')));
this.myPrizeBtn.position.set(617, 213); this.myPrizeBtn.position.set(617, 213);
this.myPrizeBtn.anchorX = 133;
// 规则按钮 // 规则按钮
this.ruleBtn = this.addChild(new Button(RES.getRes('map_ruleBtn.png'))); this.ruleBtn = this.addChild(new Button(RES.getRes('map_ruleBtn.png')));
...@@ -88,16 +81,6 @@ export default class MapUI extends Container { ...@@ -88,16 +81,6 @@ export default class MapUI extends Container {
this.energyBox = this.addChild(new EnergyBox({})); this.energyBox = this.addChild(new EnergyBox({}));
//是否显示下一次领取免费体力的icon;
var remindIcon = this.addChild(new RemindIcon());
remindIcon.position.set(560, layers.stageHeight - 166 - 82);
if (!Tools.gameData.loginAddPower) {
remindIcon.visible = true;
} else {
remindIcon.visible = false;
//不需要考虑移除,因为这种情况,免费体力弹框必出,关闭后必触发
GDispatcher.once("showRemindIcon", () => { remindIcon.visible = true; }, this)
}
} }
public updateUI() { public updateUI() {
...@@ -105,49 +88,6 @@ export default class MapUI extends Container { ...@@ -105,49 +88,6 @@ export default class MapUI extends Container {
} }
} }
/**
* 提示下次领奖的时间倒计时
*/
class RemindIcon extends Sprite {
constructor() {
super(RES.getRes("remindIcon.png"));
//文案
var txt = this.addChild(Tools.getText(
"",
24,
"#ffffff",
TEXT_ALIGN.CENTER,
130,
(179 - 130) / 2, 122
))
var zeroTime = new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1;
this.addEventListener(FYGE.Event.ENTER_FRAME, () => {
var now = Date.now();
if (now > zeroTime) {
this.visible = false;
return
}
//转时分秒
txt.text = this.getShiFenMiaoByTimeStamp(zeroTime - now);
}, this)
}
/**
* 转换成 1:2:33
* @param timeStamp
*/
getShiFenMiaoByTimeStamp(timeStamp: number): string {
var hours: any = Math.floor((timeStamp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes: any = Math.floor((timeStamp % (1000 * 60 * 60)) / (1000 * 60));
var seconds: any = Math.floor((timeStamp % (1000 * 60)) / 1000);
hours = hours < 10 ? ('0' + hours) : hours;
minutes = minutes < 10 ? ('0' + minutes) : minutes;
seconds = seconds < 10 /*&& seconds >= 1*/ ? ('0' + seconds) : seconds;
return hours + ":" + minutes + ":" + seconds;
}
}
/** /**
* 能量 * 能量
*/ */
......
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