Commit 7d8ab54b authored by wjf's avatar wjf

l

parent 1b269d69
......@@ -6139,19 +6139,30 @@ exports.ResJson = {
}
},
{
"keys": "cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.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,map_推车.png,map_狐狸气球.png,water1.png,water2.png",
"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,map_推车.png,map_狐狸气球.png,remindIcon.png,water1.png,water2.png",
"name": "map",
"atlas": {
"appointCountBg.png": {
"x": 258,
"y": 471,
"w": 259,
"h": 45,
"ox": 0,
"oy": 0,
"sw": 259,
"sh": 45,
"ro": true
},
"cur_light_1.png": {
"x": 220,
"y": 206,
"x": 258,
"y": 732,
"w": 187,
"h": 115,
"ox": 0,
"oy": 0,
"sw": 197,
"sh": 123,
"ro": true
"ro": false
},
"cur_light_2.png": {
"x": 132,
......@@ -6165,8 +6176,8 @@ exports.ResJson = {
"ro": true
},
"guide_fox.png": {
"x": 275,
"y": 793,
"x": 305,
"y": 471,
"w": 202,
"h": 219,
"ox": 0,
......@@ -6176,8 +6187,8 @@ exports.ResJson = {
"ro": false
},
"guide_hand.png": {
"x": 573,
"y": 113,
"x": 509,
"y": 406,
"w": 90,
"h": 91,
"ox": 0,
......@@ -6187,8 +6198,8 @@ exports.ResJson = {
"ro": false
},
"guide_light.png": {
"x": 380,
"y": 156,
"x": 424,
"y": 428,
"w": 40,
"h": 40,
"ox": 0,
......@@ -6208,9 +6219,20 @@ exports.ResJson = {
"sh": 166,
"ro": true
},
"loopMsgBg.png": {
"x": 170,
"y": 484,
"w": 369,
"h": 86,
"ox": 0,
"oy": 0,
"sw": 369,
"sh": 86,
"ro": true
},
"map_avatar_bg.png": {
"x": 481,
"y": 289,
"x": 483,
"y": 300,
"w": 95,
"h": 104,
"ox": 0,
......@@ -6220,8 +6242,8 @@ exports.ResJson = {
"ro": false
},
"map_check_disable.png": {
"x": 481,
"y": 178,
"x": 469,
"y": 189,
"w": 109,
"h": 90,
"ox": 0,
......@@ -6231,8 +6253,8 @@ exports.ResJson = {
"ro": true
},
"map_check_disable_prize.png": {
"x": 511,
"y": 2,
"x": 488,
"y": 846,
"w": 109,
"h": 104,
"ox": 0,
......@@ -6242,52 +6264,52 @@ exports.ResJson = {
"ro": true
},
"map_check_enable.png": {
"x": 220,
"y": 395,
"x": 614,
"y": 2,
"w": 103,
"h": 82,
"ox": 1,
"oy": 16,
"sw": 109,
"sh": 104,
"ro": false
"ro": true
},
"map_check_enable_cur.png": {
"x": 170,
"y": 793,
"x": 561,
"y": 189,
"w": 103,
"h": 82,
"ox": 2,
"oy": 15,
"sw": 109,
"sh": 104,
"ro": false
"ro": true
},
"map_creditsBg.png": {
"x": 325,
"y": 395,
"x": 469,
"y": 2,
"w": 185,
"h": 71,
"ox": 0,
"oy": 0,
"sw": 185,
"sh": 71,
"ro": false
"ro": true
},
"map_energyAdd.png": {
"x": 235,
"y": 877,
"x": 305,
"y": 692,
"w": 35,
"h": 33,
"ox": 0,
"oy": 0,
"sw": 35,
"sh": 33,
"ro": false
"ro": true
},
"map_energyBg.png": {
"x": 337,
"y": 206,
"x": 542,
"y": 2,
"w": 185,
"h": 70,
"ox": 0,
......@@ -6298,18 +6320,18 @@ exports.ResJson = {
},
"map_prizeBox.png": {
"x": 220,
"y": 2,
"y": 311,
"w": 158,
"h": 202,
"ox": 0,
"oy": 0,
"sw": 158,
"sh": 202,
"ro": false
"ro": true
},
"map_prizeBtn.png": {
"x": 409,
"y": 198,
"x": 447,
"y": 692,
"w": 152,
"h": 70,
"ox": 0,
......@@ -6319,8 +6341,8 @@ exports.ResJson = {
"ro": true
},
"map_ruleBtn.png": {
"x": 380,
"y": 2,
"x": 416,
"y": 849,
"w": 152,
"h": 70,
"ox": 0,
......@@ -6330,26 +6352,26 @@ exports.ResJson = {
"ro": true
},
"map_star_disable.png": {
"x": 235,
"y": 939,
"x": 367,
"y": 692,
"w": 25,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 25,
"sh": 24,
"ro": false
"ro": true
},
"map_star_enable.png": {
"x": 235,
"y": 912,
"x": 340,
"y": 692,
"w": 26,
"h": 25,
"ox": 0,
"oy": 0,
"sw": 26,
"sh": 25,
"ro": false
"ro": true
},
"map_taskBtn.png": {
"x": 2,
......@@ -6363,8 +6385,8 @@ exports.ResJson = {
"ro": true
},
"map_推车.png": {
"x": 170,
"y": 484,
"x": 220,
"y": 2,
"w": 247,
"h": 307,
"ox": 0,
......@@ -6384,9 +6406,20 @@ exports.ResJson = {
"sh": 480,
"ro": false
},
"remindIcon.png": {
"x": 235,
"y": 855,
"w": 179,
"h": 166,
"ox": 0,
"oy": 0,
"sw": 179,
"sh": 166,
"ro": false
},
"water1.png": {
"x": 452,
"y": 119,
"x": 488,
"y": 957,
"w": 57,
"h": 101,
"ox": 0,
......@@ -6396,8 +6429,8 @@ exports.ResJson = {
"ro": true
},
"water2.png": {
"x": 452,
"y": 2,
"x": 424,
"y": 311,
"w": 57,
"h": 115,
"ox": 0,
......@@ -10229,7 +10262,7 @@ exports.ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597303204/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597903646/resource/"
};
......@@ -11425,6 +11458,7 @@ var TbNetName;
TbNetName["completeTask"] = "babycare.completeTask";
TbNetName["getTaskList"] = "babycare.getTaskList";
TbNetName["luckyDraw"] = "babycare.luckyDraw";
TbNetName["getAppointCount"] = "mine.getAppointCount";
TbNetName["authorize"] = "mine.authorize";
TbNetName["favorShop"] = "mine.favorShop";
TbNetName["getUserAddress"] = "mine.getUserAddress";
......@@ -16858,6 +16892,7 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var FreePowerPanel = (function (_super) {
__extends(FreePowerPanel, _super);
function FreePowerPanel() {
......@@ -16880,6 +16915,10 @@ var FreePowerPanel = (function (_super) {
enumerable: true,
configurable: true
});
FreePowerPanel.prototype.hidePanel = function () {
_super.prototype.hidePanel.call(this);
Main_1.GDispatcher.dispatchEvent("showRemindIcon");
};
return FreePowerPanel;
}(Panel_1.Panel));
exports.FreePowerPanel = FreePowerPanel;
......@@ -21621,6 +21660,469 @@ var CheckCurEffect = (function (_super) {
}(Container));
/***/ }),
/***/ "./src/scene/map/LoopMsg.ts":
/*!**********************************!*\
!*** ./src/scene/map/LoopMsg.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var RES_1 = __webpack_require__(/*! ../../../module/RES */ "./module/RES.ts");
var Tools_1 = __webpack_require__(/*! ../../Tools */ "./src/Tools.ts");
var msgData = [
{
"name": "熊祉妍",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvCZevmvLvkZevkQYPH*-MFHT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "cyh1256197578",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmvLOmgSXmkYMmNuv8RIPCxWPm--MkcbMmvGXmkyMH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "柠檬爱帮鱼洗21",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkQGvHxLM0kGMkQWPFQ4vmcbOFMIvFlhOFkuMmHuvHkT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "libing199155",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGO8xYMm-IMCvYvFQGvCHyXFIT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "依然missing",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGRePHRIXmcSvH7IvCZ-vCkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "tb_8100956",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGNyPHlHMHlIvFQWMmHGMF8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "jl19980921",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MFkSM88LP88WM8kSvFPhXF9zX8cYPm*hMkQGvk8uv8gT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "tb5790247",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCxWO8kuPGMzXmQ0PF9IXmQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "justlove佳佳",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP08bPkZzPGgLXmk4XFvGPHcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "shenxiaoyu00",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP0xyMG*IvFPHXmkWMFHWXFgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "台风雨飘摇sos哀",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCNbP8kYM8xLXmMevkQbvmhzO8kyXHRHPmQWMHcbPmHT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "mwj051213",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGO8QyXHc0MGNLPHQWPH84vmQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "一米阳光4233",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmHGMk8uPFP-OmHbvCv4MG80XFRHPFlHMmQYvC7ePmkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "z梦城堡",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pm7HM0ZHvG80vGZ-vFIbMk7IPCcWMmcGvCZeMC-IMC8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "青清妍",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vmN4MC7zMkPHMmQSPk8WO8RhvHcbPFx4MmxLM0QuMkxT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "黄露露12322",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8cSXF9hXm9hXFMhvC9IPG8bM8gGv8cYvkk4PHPHPmkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "空城空心空记忆0722",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*eP8RHMCNLMGgyMk*hMHPzXFx0MmNLP8RHO8x4XFgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "薄言采薇草",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXHxSPCI4vkQSOmkuXmkyvmcT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "猪猪猪妹222",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0gYv8QuPCRHMmN4OFZeMmR-M88uvFgGvGcLXFcyvCgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "zoexuqian",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGI4P8cLvG7-vCRhM8lHOm8T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "春暖花开loveing",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8l-vC7-PGkGXmkLPGxLvkx0vmv4PFMeXFcuPm8YMm8T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "雨季kk3",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8lIM8lHMG7-v07Ivm*hOFHuX8k4vkkbMCvuMm9hvmgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "tb25358321",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8*Hv0Q0vmgyMkkYMFhhvCxSXmkLM0cGMmv0XFxGPH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "李小贱259758",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mk8WMmZzvFcYv8c0Pk*-P0Z-XHR-PCk4O8xWM0kYMH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "布偶傻妞",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OH7zX8QSvHQSOmlevFQYPkQbPCguMH84M0P-MFQYPGNT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "不变的承诺3344",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PCQuMkPIXmx4vCv4vkZzO8xGX88LO88yX8gbM0cuMmcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "justlove佳佳",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP08bPkZzPGgLXmk4XFvGPHcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb537244358",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGcLM0PzP8RHMGZhMG-eMHR-v8*-P8xyOFPevFcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "凤小高的高小凤",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFhhPCIYMFleO8*IXHQbvG*hX8gSXmIGvHc0XmQyvCgT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "qingli13",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFZ-vmvuMk8SvCvGPmZIvGNGMkZ-OFQSvCIyPFQyXHgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "陈格7788",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pm7HM0ZHvG80vGZ-vFIbMkkGvmlIMkkuv8gLXFguvCNT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "miss糖玥玥",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mmk4vCQSvm7IOHRHPHcLvGgyMH8bP0R-v0gGvkxLMmvT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "柠檬爱帮鱼洗21",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkQGvHxLM0kGMkQWPFQ4vmcbOFMIvFlhOFkuMmHuvHkT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "李丹920623",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vH7HXF9Hv0gGvFP-MkZePFH4PFvGvmQyvHQLOHx0vCkT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "b15071094383",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCHSO8kLvCQSOHg4vGIuvCISv0guOm9HvFlHvm-HvFvT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "tb76435252",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFHyvH7ePG8yOFxyMH8GPGcLvGgSvCcbvkP-MmNYMmHT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "xuan14740553370",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8*Hv0Q0vmgyMkkYMFhhvCMzOmQGPCgWM0QyvGNYv0cT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "么么碗",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk84PFvuOm*zv8QuPHkYX88YOF8bOHkLOF8bXFQSPmcT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "浅浅一笑暖人心1",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFRHPCg0XmkWOmP-vk*zvHxYOHc0O8lzPFQLPGkuOHQT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "lixiang_201212345",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0gYv8QuPCRHMmN4OFZeMmMhPChePH8GPmHYOFP-XmcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "ever夏夜",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXmILMmQGMGNyMFZePmQuvFvT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "silentme000",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGOF7hPFlIMCQ0MFguvC-IPC8T&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "zhaoyujing20",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvC7-PF-eOm-hvC9Hv0gLP08T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "lixiaoling3100",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vFHbMm8SPFPHPFRHPG7HPmQYvCvbXFhHvmPHvCcLvFcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "爱格轩",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFhhPCIYMFleO8*IXHQbvGcWO87hvF*HPGPHOmhzXm8T&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "7766dan",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MGgyPF*HXmlePmQ4PCHuvmlHX8ZhPFIWPCQWvF7zMmkT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "叶鹏0503",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=M0RHOmMHv8xbMFguvFRIP0QYMkcYPCxyMG7-X8xLMHxT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "潘妤婷t",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkxGPFl-MCIbP0*eM8xyvHPIXHZhXHg4vG--PFHbPGNT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb502707_00",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MCMHXHk0MCgLMC7-v87HPC-ePG*IPFheM8cWMGvWMF8T&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "synran",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCxYMFHuO8k4OFkLO8l-vFgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "ever夏夜",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXmILMmQGMGNyMFZePmQuvFvT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "zyf20080701",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vH8LMGQyOH80OmxSvGNGMCgYOF7Hv8ZIXF8uPCPhM08T&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "还是如此60586804",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MGgyPF*HXmlePmQ4PCHuvmhIvFMIPmHuMC-zMG-HPCQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "不二兔子33",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCgbPkx0MHg0XHgSOmIWMmvLMHRhvGhHXFQLM0RzMCvT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb3882885",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvCN0XFI4vFgGMHxyMmgbPmkT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "yan昕瑶",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkxGPFl-MCIbP0*eM8xyvmQ0XHxGMCQyPFkYPGI0P0gT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "越多多",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmxWXFRhP0levCvbvkQSvWTT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "五弦务虚",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PH84XHxGvm7zM0xLMGlHPGvuOHlHMGIWvGk0MH7ePkcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "44cmpxbm",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mmk4vCQSvm7IOHRHPHcLv0P-MkQSPm7hvF*hv0ZIMHQT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "dandan丹崽",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OmNuMm9evkgGvkkGvkk0PCQbPGQbv0kSvk7zMmQGOFgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "jiandiwen",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vGZhv8*-vkk0MGZHMmvbvkc4XmvWPmPzMFQWPCv4MmgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "meizi052",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCHLPmxGMkQLMG*HvmlzOH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "梓昕刘",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*HOFxSPCNGOHgyX8R-M0gSXm8WMF8bOF9zvGN0vCQT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "侯晓宇59025",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OmNuMm9evkgGvkkGvkk0Pk*-MGgSMCgWXHPhPFHbMCcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "zhangjinxue99",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MCleXFvGM8ZIMm7HX8RHvFcbMGk4O8cYPkRhP8*hPmHT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "toug凯凯",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PCPIXH7evC7ePm9hMG*IP0ZePFZ-MF8bvF9ePFcWPkcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "新晨的雨",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCHGPGkLMFHGPFk4P8gyv08T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "采aini",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vF8WOmIuOHZzvCMePCl-OFxuvHlePGgLPGxSvFkyvCgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "遛遛看看16",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPC7zPFPzMCHWv8ZIXHgyPFvT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "零星一念",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0x4vFcWvH*eMCQuvFcuMWTT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
}
];
var LoopMsg = (function (_super) {
__extends(LoopMsg, _super);
function LoopMsg() {
var _this = _super.call(this) || this;
var count = 0;
_this.item = _this.addChild(new LoopMsgItem(msgData[count++]));
_this.item.alpha = 0;
FYGE.Tween.get(_this.item, { loop: true })
.set({ alpha: 1, x: -370, y: 0 })
.to({ x: -65 }, 700, FYGE.Ease.backOut)
.wait(1000)
.to({ alpha: 0, y: -100 }, 400)
.wait(500)
.call(function () {
_this.item.reset(msgData[count++] || msgData[count = 0]);
});
return _this;
}
LoopMsg.prototype.destroy = function () {
FYGE.Tween.removeTweens(this.item);
this.item = null;
_super.prototype.destroy.call(this);
};
return LoopMsg;
}(FYGE.Container));
exports.LoopMsg = LoopMsg;
var LoopMsgItem = (function (_super) {
__extends(LoopMsgItem, _super);
function LoopMsgItem(data) {
var _this = _super.call(this, RES_1.RES.getRes("loopMsgBg.png")) || this;
_this.limit = 12;
var img = _this.addChild(FYGE.Sprite.fromUrl(data.img));
img.width = img.height = 66;
img.position.set(75, (87 - 66) / 2);
_this.img = img;
var mask = _this.addChild(new FYGE.Shape());
mask.beginFill(0x000000);
mask.drawCircle(33, 33, 33);
mask.endFill();
mask.position.copy(img.position);
img.mask = mask;
var name = _this.getRealLength(data.name) > _this.limit ? _this.cutString(data.name, _this.limit) + "..." : data.name;
var prize = _this.getRealLength(data.prize) > _this.limit ? _this.cutString(data.prize, _this.limit) + "..." : data.prize;
var txt = _this.addChild(Tools_1.Tools.getText("\u606D\u559C" + name + "\n\u62BD\u4E2D" + prize, 22, "#fefefe"));
txt.position.set(150, 16);
txt.lineSpacing = 13;
_this.txt = txt;
return _this;
}
LoopMsgItem.prototype.getRealLength = function (str) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128)
realLength += 1;
else
realLength += 2;
}
return realLength;
};
LoopMsgItem.prototype.cutString = function (str, realLength) {
var length = 0;
var out = "";
for (var _i = 0, str_1 = str; _i < str_1.length; _i++) {
var i = str_1[_i];
var charCode = i.charCodeAt(0);
if (charCode >= 0 && charCode <= 128)
length += 1;
else
length += 2;
if (length <= realLength)
out = out.concat(i);
if (length >= realLength)
break;
}
return out;
};
LoopMsgItem.prototype.reset = function (data) {
this.img.texture = FYGE.Texture.fromUrl(data.img);
var name = this.getRealLength(data.name) > this.limit ? this.cutString(data.name, this.limit) + "..." : data.name;
var prize = this.getRealLength(data.prize) > this.limit ? this.cutString(data.prize, this.limit) + "..." : data.prize;
this.txt.text = "\u606D\u559C" + name + "\n\u62BD\u4E2D" + prize;
};
return LoopMsgItem;
}(FYGE.Sprite));
/***/ }),
/***/ "./src/scene/map/MapBottom.ts":
......@@ -22281,6 +22783,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
var Container = FYGE.Container;
var Button = FYGE.Button;
var Sprite = FYGE.Sprite;
var TEXT_ALIGN = FYGE.TEXT_ALIGN;
var RES_1 = __webpack_require__(/*! ../../../module/RES */ "./module/RES.ts");
var Tools_1 = __webpack_require__(/*! ../../Tools */ "./src/Tools.ts");
......@@ -22295,6 +22798,8 @@ var LotteryScene_1 = __webpack_require__(/*! ../LotteryScene */ "./src/scene/Lot
var Main_1 = __webpack_require__(/*! ../../Main */ "./src/Main.ts");
var G_EVENT_1 = __webpack_require__(/*! ../../common/G_EVENT */ "./src/common/G_EVENT.ts");
var Tween = FYGE.Tween;
var layers_1 = __webpack_require__(/*! ../../../module/views/layers */ "./module/views/layers.ts");
var LoopMsg_1 = __webpack_require__(/*! ./LoopMsg */ "./src/scene/map/LoopMsg.ts");
var MapUI = (function (_super) {
__extends(MapUI, _super);
function MapUI() {
......@@ -22346,6 +22851,7 @@ var MapUI = (function (_super) {
this.removeEvent();
};
MapUI.prototype.initUi = function () {
var _this = this;
this.myPrizeBtn = this.addChild(new Button(RES_1.RES.getRes('map_prizeBtn.png')));
this.myPrizeBtn.position.set(0, 185);
this.myPrizeBtn.anchorX = 0;
......@@ -22357,6 +22863,30 @@ var MapUI = (function (_super) {
this.energyBox = this.addChild(new EnergyBox({}));
this.creditsBox = this.addChild(new CreditsBox({}));
this.prizeBox = this.addChild(new PrizeBox({}));
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getAppointCount).then(function (res) {
if (!res.success)
return;
_this.addChild(new (function (_super) {
__extends(class_1, _super);
function class_1() {
var _this = _super.call(this, RES_1.RES.getRes("appointCountBg.png")) || this;
_this.addChild(Tools_1.Tools.getText(res.data + "\u4EBA\u5DF2\u89E3\u9501120\u5173", 26, "#ffffff", TEXT_ALIGN.CENTER, 259, 0, 10));
return _this;
}
return class_1;
}(Sprite)))
.position.set(_this.prizeBox.x - 51, _this.prizeBox.y + 202 + 40);
});
this.addChild(new LoopMsg_1.LoopMsg()).position.set(0, layers_1.layers.stageHeight - 100 - 86);
var remindIcon = this.addChild(new RemindIcon());
remindIcon.position.set(560, layers_1.layers.stageHeight - 166 - 82);
if (!Tools_1.Tools.gameData.loginAddPower) {
remindIcon.visible = true;
}
else {
remindIcon.visible = false;
Main_1.GDispatcher.once("showRemindIcon", function () { remindIcon.visible = true; }, this);
}
};
MapUI.prototype.updateUI = function () {
this.creditsBox.updateCredits();
......@@ -22365,6 +22895,33 @@ var MapUI = (function (_super) {
return MapUI;
}(Container));
exports.default = MapUI;
var RemindIcon = (function (_super) {
__extends(RemindIcon, _super);
function RemindIcon() {
var _this = _super.call(this, RES_1.RES.getRes("remindIcon.png")) || this;
var txt = _this.addChild(Tools_1.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, function () {
var now = Date.now();
if (now > zeroTime) {
_this.visible = false;
return;
}
txt.text = _this.getShiFenMiaoByTimeStamp(zeroTime - now);
}, _this);
return _this;
}
RemindIcon.prototype.getShiFenMiaoByTimeStamp = function (timeStamp) {
var hours = Math.floor((timeStamp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((timeStamp % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((timeStamp % (1000 * 60)) / 1000);
hours = hours < 10 ? ('0' + hours) : hours;
minutes = minutes < 10 ? ('0' + minutes) : minutes;
seconds = seconds < 10 ? ('0' + seconds) : seconds;
return hours + ":" + minutes + ":" + seconds;
};
return RemindIcon;
}(Sprite));
var EnergyBox = (function (_super) {
__extends(EnergyBox, _super);
function EnergyBox(data) {
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -49,7 +49,7 @@
"name": "lotteryScene"
},
{
"keys": "cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.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,map_推车.png,map_狐狸气球.png,water1.png,water2.png",
"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,map_推车.png,map_狐狸气球.png,remindIcon.png,water1.png,water2.png",
"name": "map"
},
{
......
......@@ -4319,19 +4319,30 @@ export const ResJson = {
}
},
{
"keys": "cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.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,map_推车.png,map_狐狸气球.png,water1.png,water2.png",
"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,map_推车.png,map_狐狸气球.png,remindIcon.png,water1.png,water2.png",
"name": "map",
"atlas": {
"appointCountBg.png": {
"x": 258,
"y": 471,
"w": 259,
"h": 45,
"ox": 0,
"oy": 0,
"sw": 259,
"sh": 45,
"ro": true
},
"cur_light_1.png": {
"x": 220,
"y": 206,
"x": 258,
"y": 732,
"w": 187,
"h": 115,
"ox": 0,
"oy": 0,
"sw": 197,
"sh": 123,
"ro": true
"ro": false
},
"cur_light_2.png": {
"x": 132,
......@@ -4345,8 +4356,8 @@ export const ResJson = {
"ro": true
},
"guide_fox.png": {
"x": 275,
"y": 793,
"x": 305,
"y": 471,
"w": 202,
"h": 219,
"ox": 0,
......@@ -4356,8 +4367,8 @@ export const ResJson = {
"ro": false
},
"guide_hand.png": {
"x": 573,
"y": 113,
"x": 509,
"y": 406,
"w": 90,
"h": 91,
"ox": 0,
......@@ -4367,8 +4378,8 @@ export const ResJson = {
"ro": false
},
"guide_light.png": {
"x": 380,
"y": 156,
"x": 424,
"y": 428,
"w": 40,
"h": 40,
"ox": 0,
......@@ -4388,9 +4399,20 @@ export const ResJson = {
"sh": 166,
"ro": true
},
"loopMsgBg.png": {
"x": 170,
"y": 484,
"w": 369,
"h": 86,
"ox": 0,
"oy": 0,
"sw": 369,
"sh": 86,
"ro": true
},
"map_avatar_bg.png": {
"x": 481,
"y": 289,
"x": 483,
"y": 300,
"w": 95,
"h": 104,
"ox": 0,
......@@ -4400,8 +4422,8 @@ export const ResJson = {
"ro": false
},
"map_check_disable.png": {
"x": 481,
"y": 178,
"x": 469,
"y": 189,
"w": 109,
"h": 90,
"ox": 0,
......@@ -4411,8 +4433,8 @@ export const ResJson = {
"ro": true
},
"map_check_disable_prize.png": {
"x": 511,
"y": 2,
"x": 488,
"y": 846,
"w": 109,
"h": 104,
"ox": 0,
......@@ -4422,52 +4444,52 @@ export const ResJson = {
"ro": true
},
"map_check_enable.png": {
"x": 220,
"y": 395,
"x": 614,
"y": 2,
"w": 103,
"h": 82,
"ox": 1,
"oy": 16,
"sw": 109,
"sh": 104,
"ro": false
"ro": true
},
"map_check_enable_cur.png": {
"x": 170,
"y": 793,
"x": 561,
"y": 189,
"w": 103,
"h": 82,
"ox": 2,
"oy": 15,
"sw": 109,
"sh": 104,
"ro": false
"ro": true
},
"map_creditsBg.png": {
"x": 325,
"y": 395,
"x": 469,
"y": 2,
"w": 185,
"h": 71,
"ox": 0,
"oy": 0,
"sw": 185,
"sh": 71,
"ro": false
"ro": true
},
"map_energyAdd.png": {
"x": 235,
"y": 877,
"x": 305,
"y": 692,
"w": 35,
"h": 33,
"ox": 0,
"oy": 0,
"sw": 35,
"sh": 33,
"ro": false
"ro": true
},
"map_energyBg.png": {
"x": 337,
"y": 206,
"x": 542,
"y": 2,
"w": 185,
"h": 70,
"ox": 0,
......@@ -4478,18 +4500,18 @@ export const ResJson = {
},
"map_prizeBox.png": {
"x": 220,
"y": 2,
"y": 311,
"w": 158,
"h": 202,
"ox": 0,
"oy": 0,
"sw": 158,
"sh": 202,
"ro": false
"ro": true
},
"map_prizeBtn.png": {
"x": 409,
"y": 198,
"x": 447,
"y": 692,
"w": 152,
"h": 70,
"ox": 0,
......@@ -4499,8 +4521,8 @@ export const ResJson = {
"ro": true
},
"map_ruleBtn.png": {
"x": 380,
"y": 2,
"x": 416,
"y": 849,
"w": 152,
"h": 70,
"ox": 0,
......@@ -4510,26 +4532,26 @@ export const ResJson = {
"ro": true
},
"map_star_disable.png": {
"x": 235,
"y": 939,
"x": 367,
"y": 692,
"w": 25,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 25,
"sh": 24,
"ro": false
"ro": true
},
"map_star_enable.png": {
"x": 235,
"y": 912,
"x": 340,
"y": 692,
"w": 26,
"h": 25,
"ox": 0,
"oy": 0,
"sw": 26,
"sh": 25,
"ro": false
"ro": true
},
"map_taskBtn.png": {
"x": 2,
......@@ -4543,8 +4565,8 @@ export const ResJson = {
"ro": true
},
"map_推车.png": {
"x": 170,
"y": 484,
"x": 220,
"y": 2,
"w": 247,
"h": 307,
"ox": 0,
......@@ -4564,9 +4586,20 @@ export const ResJson = {
"sh": 480,
"ro": false
},
"remindIcon.png": {
"x": 235,
"y": 855,
"w": 179,
"h": 166,
"ox": 0,
"oy": 0,
"sw": 179,
"sh": 166,
"ro": false
},
"water1.png": {
"x": 452,
"y": 119,
"x": 488,
"y": 957,
"w": 57,
"h": 101,
"ox": 0,
......@@ -4576,8 +4609,8 @@ export const ResJson = {
"ro": true
},
"water2.png": {
"x": 452,
"y": 2,
"x": 424,
"y": 311,
"w": 57,
"h": 115,
"ox": 0,
......@@ -8409,5 +8442,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597303204/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597903646/resource/"
}
\ No newline at end of file
......@@ -84,6 +84,11 @@ export enum TbNetName {
///////////////////前端调用接口都加个mine
/**
* 获取120名通关的人数
*/
getAppointCount = "mine.getAppointCount",
////带用户操作,和index.js特殊操作的
/**
* 用户授权
......
import { Panel } from "../../module/views/Panel";
import { GDispatcher } from "../Main";
export class FreePowerPanel extends Panel {
get groupNames() { return ["FreePowerPanel"] }
get skinName() { return "FreePowerPanel" }
acceptBtn:FYGE.Button;
closeBtn:FYGE.Button;
acceptBtn: FYGE.Button;
closeBtn: FYGE.Button;
get closeBtns(){
return [this.closeBtn,this.acceptBtn]
get closeBtns() {
return [this.closeBtn, this.acceptBtn]
}
hidePanel() {
super.hidePanel();
//显示倒计时
GDispatcher.dispatchEvent("showRemindIcon")
}
}
import { RES } from "../../../module/RES";
import { Tools } from "../../Tools";
const msgData: LoopMsgData[] = [
{
"name": "熊祉妍",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvCZevmvLvkZevkQYPH*-MFHT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "cyh1256197578",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmvLOmgSXmkYMmNuv8RIPCxWPm--MkcbMmvGXmkyMH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "柠檬爱帮鱼洗21",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkQGvHxLM0kGMkQWPFQ4vmcbOFMIvFlhOFkuMmHuvHkT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "libing199155",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGO8xYMm-IMCvYvFQGvCHyXFIT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "依然missing",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGRePHRIXmcSvH7IvCZ-vCkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "tb_8100956",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGNyPHlHMHlIvFQWMmHGMF8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "jl19980921",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MFkSM88LP88WM8kSvFPhXF9zX8cYPm*hMkQGvk8uv8gT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "tb5790247",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCxWO8kuPGMzXmQ0PF9IXmQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "justlove佳佳",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP08bPkZzPGgLXmk4XFvGPHcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "shenxiaoyu00",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP0xyMG*IvFPHXmkWMFHWXFgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "台风雨飘摇sos哀",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCNbP8kYM8xLXmMevkQbvmhzO8kyXHRHPmQWMHcbPmHT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "mwj051213",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGO8QyXHc0MGNLPHQWPH84vmQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "一米阳光4233",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmHGMk8uPFP-OmHbvCv4MG80XFRHPFlHMmQYvC7ePmkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "z梦城堡",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pm7HM0ZHvG80vGZ-vFIbMk7IPCcWMmcGvCZeMC-IMC8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "青清妍",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vmN4MC7zMkPHMmQSPk8WO8RhvHcbPFx4MmxLM0QuMkxT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "黄露露12322",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8cSXF9hXm9hXFMhvC9IPG8bM8gGv8cYvkk4PHPHPmkT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "空城空心空记忆0722",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*eP8RHMCNLMGgyMk*hMHPzXFx0MmNLP8RHO8x4XFgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "薄言采薇草",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXHxSPCI4vkQSOmkuXmkyvmcT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "猪猪猪妹222",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0gYv8QuPCRHMmN4OFZeMmR-M88uvFgGvGcLXFcyvCgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "zoexuqian",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyPGI4P8cLvG7-vCRhM8lHOm8T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "春暖花开loveing",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8l-vC7-PGkGXmkLPGxLvkx0vmv4PFMeXFcuPm8YMm8T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "雨季kk3",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8lIM8lHMG7-v07Ivm*hOFHuX8k4vkkbMCvuMm9hvmgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "tb25358321",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8*Hv0Q0vmgyMkkYMFhhvCxSXmkLM0cGMmv0XFxGPH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "李小贱259758",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mk8WMmZzvFcYv8c0Pk*-P0Z-XHR-PCk4O8xWM0kYMH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "布偶傻妞",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OH7zX8QSvHQSOmlevFQYPkQbPCguMH84M0P-MFQYPGNT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "不变的承诺3344",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PCQuMkPIXmx4vCv4vkZzO8xGX88LO88yX8gbM0cuMmcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "justlove佳佳",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGH0XmQGOFNWMCQyP08bPkZzPGgLXmk4XFvGPHcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb537244358",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFvSvGcLM0PzP8RHMGZhMG-eMHR-v8*-P8xyOFPevFcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "凤小高的高小凤",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFhhPCIYMFleO8*IXHQbvG*hX8gSXmIGvHc0XmQyvCgT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "qingli13",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFZ-vmvuMk8SvCvGPmZIvGNGMkZ-OFQSvCIyPFQyXHgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "陈格7788",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pm7HM0ZHvG80vGZ-vFIbMkkGvmlIMkkuv8gLXFguvCNT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "miss糖玥玥",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mmk4vCQSvm7IOHRHPHcLvGgyMH8bP0R-v0gGvkxLMmvT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "柠檬爱帮鱼洗21",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkQGvHxLM0kGMkQWPFQ4vmcbOFMIvFlhOFkuMmHuvHkT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "李丹920623",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vH7HXF9Hv0gGvFP-MkZePFH4PFvGvmQyvHQLOHx0vCkT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "b15071094383",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCHSO8kLvCQSOHg4vGIuvCISv0guOm9HvFlHvm-HvFvT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "tb76435252",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFHyvH7ePG8yOFxyMH8GPGcLvGgSvCcbvkP-MmNYMmHT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "xuan14740553370",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8*Hv0Q0vmgyMkkYMFhhvCMzOmQGPCgWM0QyvGNYv0cT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "么么碗",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk84PFvuOm*zv8QuPHkYX88YOF8bOHkLOF8bXFQSPmcT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "浅浅一笑暖人心1",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=XFRHPCg0XmkWOmP-vk*zvHxYOHc0O8lzPFQLPGkuOHQT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "lixiang_201212345",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0gYv8QuPCRHMmN4OFZeMmMhPChePH8GPmHYOFP-XmcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "ever夏夜",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXmILMmQGMGNyMFZePmQuvFvT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "silentme000",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8RhvGH0vmk0vFIWvmQGOF7hPFlIMCQ0MFguvC-IPC8T&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "zhaoyujing20",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvC7-PF-eOm-hvC9Hv0gLP08T&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "lixiaoling3100",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vFHbMm8SPFPHPFRHPG7HPmQYvCvbXFhHvmPHvCcLvFcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*1包"
},
{
"name": "爱格轩",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OFhhPCIYMFleO8*IXHQbvGcWO87hvF*HPGPHOmhzXm8T&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "7766dan",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MGgyPF*HXmlePmQ4PCHuvmlHX8ZhPFIWPCQWvF7zMmkT&width=80&height=80&type=sns",
"prize": "洗护礼包"
},
{
"name": "叶鹏0503",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=M0RHOmMHv8xbMFguvFRIP0QYMkcYPCxyMG7-X8xLMHxT&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "潘妤婷t",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkxGPFl-MCIbP0*eM8xyvHPIXHZhXHg4vG--PFHbPGNT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb502707_00",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MCMHXHk0MCgLMC7-v87HPC-ePG*IPFheM8cWMGvWMF8T&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "synran",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCxYMFHuO8k4OFkLO8l-vFgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "ever夏夜",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PChhvGkbOmRzvC84OmHLXmILMmQGMGNyMFZePmQuvFvT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "zyf20080701",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vH8LMGQyOH80OmxSvGNGMCgYOF7Hv8ZIXF8uPCPhM08T&width=80&height=80&type=sns",
"prize": "出行礼包"
},
{
"name": "还是如此60586804",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MGgyPF*HXmlePmQ4PCHuvmhIvFMIPmHuMC-zMG-HPCQT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "不二兔子33",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vCgbPkx0MHg0XHgSOmIWMmvLMHRhvGhHXFQLM0RzMCvT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "tb3882885",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=O8xbXm84vHkuOHRIvmIGvCN0XFI4vFgGMHxyMmgbPmkT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "yan昕瑶",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MkxGPFl-MCIbP0*eM8xyvmQ0XHxGMCQyPFkYPGI0P0gT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "越多多",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MmxWXFRhP0levCvbvkQSvWTT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "五弦务虚",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PH84XHxGvm7zM0xLMGlHPGvuOHlHMGIWvGk0MH7ePkcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "44cmpxbm",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Mmk4vCQSvm7IOHRHPHcLv0P-MkQSPm7hvF*hv0ZIMHQT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "dandan丹崽",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OmNuMm9evkgGvkkGvkk0PCQbPGQbv0kSvk7zMmQGOFgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "jiandiwen",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vGZhv8*-vkk0MGZHMmvbvkc4XmvWPmPzMFQWPCv4MmgT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "meizi052",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCHLPmxGMkQLMG*HvmlzOH8T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "梓昕刘",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=Pk*HOFxSPCNGOHgyX8R-M0gSXm8WMF8bOF9zvGN0vCQT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "侯晓宇59025",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=OmNuMm9evkgGvkkGvkk0Pk*-MGgSMCgWXHPhPFHbMCcT&width=80&height=80&type=sns",
"prize": "玩具礼包"
},
{
"name": "zhangjinxue99",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=MCleXFvGM8ZIMm7HX8RHvFcbMGk4O8cYPkRhP8*hPmHT&width=80&height=80&type=sns",
"prize": "棉柔巾100抽*6包"
},
{
"name": "toug凯凯",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=PCPIXH7evC7ePm9hMG*IP0ZePFZ-MF8bvF9ePFcWPkcT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "新晨的雨",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPCHGPGkLMFHGPFk4P8gyv08T&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "采aini",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=vF8WOmIuOHZzvCMePCl-OFxuvHlePGgLPGxSvFkyvCgT&width=80&height=80&type=sns",
"prize": "紫盖湿巾80抽*3包"
},
{
"name": "遛遛看看16",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P8cYPG*IXmkLPk7zPCNLPC7zPFPzMCHWv8ZIXHgyPFvT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
},
{
"name": "零星一念",
"img": "http://wwc.alicdn.com/avatar/getAvatar.do?userIdStr=P0x4vFcWvH*eMCQuvFcuMWTT&width=80&height=80&type=sns",
"prize": "云柔巾108抽*6包"
}
]
interface LoopMsgData {
img: string,
name: string,
prize: string
}
export class LoopMsg extends FYGE.Container {
private item: LoopMsgItem
constructor() {
super();
let count = 0;
this.item = this.addChild(new LoopMsgItem(msgData[count++]));
this.item.alpha = 0;
//循环起来
FYGE.Tween.get(this.item, { loop: true })
.set({ alpha: 1, x: -370, y: 0 })
.to({ x: -65 }, 700, FYGE.Ease.backOut)
.wait(1000)
.to({ alpha: 0, y: -100 }, 400)
.wait(500)
.call(() => {
this.item.reset(msgData[count++] || msgData[count = 0])
})
}
destroy() {
FYGE.Tween.removeTweens(this.item);
this.item = null;
super.destroy()
}
}
/**
* 循环的中奖轮播
*/
class LoopMsgItem extends FYGE.Sprite {
private img: FYGE.Sprite;
private txt: FYGE.TextField;
private limit = 12;
constructor(data: LoopMsgData) {
super(RES.getRes("loopMsgBg.png"))
//头像
var img = this.addChild(FYGE.Sprite.fromUrl(data.img));
img.width = img.height = 66;
img.position.set(75, (87 - 66) / 2);
this.img = img;
//圆形遮罩
var mask = this.addChild(new FYGE.Shape());
mask.beginFill(0x000000);
mask.drawCircle(33, 33, 33)
mask.endFill();
mask.position.copy(img.position);
img.mask = mask;
var name = this.getRealLength(data.name) > this.limit ? this.cutString(data.name, this.limit) + "..." : data.name;
var prize = this.getRealLength(data.prize) > this.limit ? this.cutString(data.prize, this.limit) + "..." : data.prize;
//文字信息
var txt = this.addChild(Tools.getText(
`恭喜${name}\n抽中${prize}`,
22,
"#fefefe",
))
txt.position.set(150, 16);
txt.lineSpacing = 13;
this.txt = txt;
}
private getRealLength(str: string) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
}
private cutString(str: string, realLength: number) {
let length = 0;
let out = "";
for (let i of str) {
let charCode = i.charCodeAt(0);
if (charCode >= 0 && charCode <= 128) length += 1;
else length += 2;
if (length <= realLength)
out = out.concat(i);
if (length >= realLength)
break;
}
return out;
}
reset(data: LoopMsgData) {
this.img.texture = FYGE.Texture.fromUrl(data.img);
var name = this.getRealLength(data.name) > this.limit ? this.cutString(data.name, this.limit) + "..." : data.name;
var prize = this.getRealLength(data.prize) > this.limit ? this.cutString(data.prize, this.limit) + "..." : data.prize;
this.txt.text = `恭喜${name}\n抽中${prize}`;
}
}
// class A {
// constructor() {
// this.init()
// }
// init() {
// }
// }
// class B extends A {
// private a = 1;
// init() {
// this.a = 2
// }
// }
// console.log(new B())
\ No newline at end of file
......@@ -16,6 +16,8 @@ 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";
import { LoopMsg } from "./LoopMsg";
export default class MapUI extends Container {
public energyBox: EnergyBox = null;
......@@ -58,7 +60,7 @@ export default class MapUI extends Container {
console.log('我的奖品');
sendTbNet(
TbNetName.navigateTo,
{url: '/pages/myPrize/myPrize'},
{ url: '/pages/myPrize/myPrize' },
() => {
},
true
......@@ -100,6 +102,37 @@ export default class MapUI extends Container {
this.energyBox = this.addChild(new EnergyBox({}));
this.creditsBox = this.addChild(new CreditsBox({}));
this.prizeBox = this.addChild(new PrizeBox({}));
//显示120关通关人数
sendTbNet(TbNetName.getAppointCount).then((res) => {
if (!res.success) return;
this.addChild(new class extends Sprite {
constructor() {
super(RES.getRes("appointCountBg.png"));
this.addChild(Tools.getText(
`${res.data}人已解锁120关`,
26,
"#ffffff",
TEXT_ALIGN.CENTER, 259,
0, 10
))
}
})
.position.set(this.prizeBox.x - 51, this.prizeBox.y + 202 + 40)
})
//轮播的中奖
this.addChild(new LoopMsg()).position.set(0, layers.stageHeight - 100 - 86)
//是否显示下一次领取免费体力的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() {
......@@ -108,6 +141,49 @@ 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;
}
}
/**
* 能量
*/
......@@ -243,7 +319,7 @@ class PrizeBox extends Button {
this["frames"] = null
// s.scale.x = s.scale.y = 0.9
Tween.removeTweens(this);
Tween.get(this).to({scaleX: 1, scaleY: 1}, 50);
Tween.get(this).to({ scaleX: 1, scaleY: 1 }, 50);
}
} else {
// @ts-ignore
......@@ -254,7 +330,7 @@ class PrizeBox extends Button {
this["frames"] = this["framesOri"]
// s.scale.x = s.scale.y = 1
Tween.removeTweens(this);
Tween.get(this).to({scaleX: 1.2, scaleY: 1.2}, 50);
Tween.get(this).to({ scaleX: 1.2, scaleY: 1.2 }, 50);
}
}
}
......@@ -344,7 +420,7 @@ class PrizeBox extends Button {
this.prizeImg.texture = Texture.fromUrl(Tools.baseInfo.levelPrize[`level_${lowerLevel}`]);
this.addEventListener(FYGE.MouseEvent.CLICK, () => {
Tools.btnDelay(this);
changeScene(LotteryScene, {level: lowerLevel})
changeScene(LotteryScene, { level: lowerLevel })
}, this)
}
}
......
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