Commit 051597b2 authored by 熊东起's avatar 熊东起

优化

parent 3c45be53
......@@ -5,9 +5,12 @@ self.__appxInited = 1;
require('./config$');
var AFAppX = self.AFAppX.getAppContext
? self.AFAppX.getAppContext().AFAppX
: self.AFAppX;
if( navigator.userAgent && (navigator.userAgent.indexOf('LyraVM') > 0 || navigator.userAgent.indexOf('AlipayIDE') > 0) ) {
var AFAppX = self.AFAppX.getAppContext ? self.AFAppX.getAppContext().AFAppX : self.AFAppX;
} else {
importScripts('https://appx/af-appx.worker.min.js');
var AFAppX = self.AFAppX;
}
self.getCurrentPages = AFAppX.getCurrentPages;
self.getApp = AFAppX.getApp;
self.Page = AFAppX.Page;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
import cloud from '@tbmp/mp-cloud-sdk';
cloud.init({
env: 'online' //'online' test
env: 'test' //'online' test
});
App({
cloud,
......@@ -14,10 +14,10 @@ App({
// options.query == {number:1}///"enableSkia": "true"
console.info('App onLaunch');
const { activityId } = options.query || {};
console.log(activityId)
this.activityId = activityId || '5efc831552bbde91d19e2cac';
console.log(activityId);
// this.activityId = activityId || '5efc831552bbde91d19e2cac';
// this.activityId = activityId || '5ef880873075d9927e7f10b4';
// this.activityId = activityId || '5ef1b4f72ad1116ce639e23e';
this.activityId = activityId || '5efc14a98e6a08930b59105d';
},
onShow(options) {
// 从后台被 scheme 重新打开
......
......@@ -153,6 +153,7 @@ var RES;
}
RES.loadGroup = loadGroup;
function getResAsync(str, comFun, thisObj) {
str = str || "";
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
if (FYGE.TextureCache[str]) {
......@@ -274,6 +275,7 @@ var RES;
}
RES.getResByUrl = getResByUrl;
function getRes(str) {
str = str || "";
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
if (type == "png" || type == "jpg") {
return FYGE.TextureCache[str] || null;
......@@ -471,6 +473,8 @@ var PanelCtrl = (function () {
};
PanelCtrl.prototype.show = function (cls, data) {
var _this = this;
this._bg.alpha = 0.7;
this._bg.visible = true;
waitingCtrl_1.showWaiting();
var panel = new cls(data);
this.add(panel);
......@@ -663,7 +667,6 @@ var initToast = function () {
_toast = new Toast();
_parent = layers_1.layers.toastLayer;
_toast.alpha = 0;
_toast.x = layers_1.layers.stageOffsetX - _parent.x + (layers_1.layers.stageWidth - _toast.width) / 2;
var h = _toast.height;
var y = layers_1.layers.stageOffsetY - _parent.y;
startY = y - h;
......@@ -718,7 +721,9 @@ var Toast = (function (_super) {
}
Toast.prototype.show = function (msg) {
this.msg.text = msg;
this.msg.x = (this.bg.width - this.msg.textWidth) / 2;
this.bg.width = Math.max(this.msg.textWidth + this.PADDING * 2, 523);
this.msg.x = (layers_1.layers.stageWidth - this.msg.textWidth) / 2;
this.bg.x = (layers_1.layers.stageWidth - this.bg.width) / 2;
};
Toast.prototype.destroy = function () {
_super.prototype.destroy.call(this);
......@@ -1480,7 +1485,7 @@ var MConfigs;
});
}
MConfigs.updateConfig = updateConfig;
MConfigs.countDown = 60 * 5;
MConfigs.countDown = 3 * 60;
MConfigs.size = [0.3125, 0.5357, 0.7321, 1];
MConfigs.drop = [
{
......@@ -1796,6 +1801,7 @@ var MUtils;
}
MUtils.getVector = getVector;
function stringOverEllipsis(str, limit) {
str = str || "";
if (str.length > limit) {
return str.substring(0, limit) + "...";
}
......@@ -2514,6 +2520,9 @@ var SoundMgr = (function () {
innerAudioContext.onStop(function () {
console.log('onStop');
});
innerAudioContext.onEnded(function () {
console.log('onEnded');
});
}
else {
this.audio.play();
......@@ -3001,74 +3010,74 @@ exports.ResJson = {
"name": "dxqPlayScene",
"atlas": {
"ball_0.png": {
"x": 438,
"y": 890,
"w": 254,
"h": 254,
"x": 454,
"y": 641,
"w": 261,
"h": 261,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"sw": 261,
"sh": 261,
"ro": false
},
"ball_1.png": {
"x": 2,
"y": 763,
"w": 254,
"h": 254,
"x": 717,
"y": 799,
"w": 259,
"h": 260,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"ro": false
"sw": 259,
"sh": 260,
"ro": true
},
"ball_2.png": {
"x": 710,
"y": 792,
"w": 254,
"h": 254,
"x": 454,
"y": 378,
"w": 267,
"h": 261,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"sw": 267,
"sh": 261,
"ro": false
},
"ball_3.png": {
"x": 454,
"y": 634,
"w": 254,
"h": 254,
"x": 723,
"y": 536,
"w": 261,
"h": 261,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"sw": 261,
"sh": 261,
"ro": false
},
"ball_4.png": {
"x": 729,
"y": 536,
"w": 254,
"h": 254,
"x": 2,
"y": 763,
"w": 258,
"h": 260,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"ro": false
"sw": 258,
"sh": 260,
"ro": true
},
"ball_5.png": {
"x": 454,
"y": 378,
"w": 254,
"h": 254,
"x": 2,
"y": 763,
"w": 258,
"h": 260,
"ox": 0,
"oy": 0,
"sw": 254,
"sh": 254,
"ro": false
"sw": 258,
"sh": 260,
"ro": true
},
"ball_num_0.png": {
"x": 496,
"y": 1346,
"x": 182,
"y": 1311,
"w": 38,
"h": 69,
"ox": 0,
......@@ -3078,8 +3087,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_1.png": {
"x": 710,
"y": 448,
"x": 688,
"y": 1078,
"w": 20,
"h": 68,
"ox": 0,
......@@ -3089,8 +3098,8 @@ exports.ResJson = {
"ro": false
},
"ball_num_2.png": {
"x": 425,
"y": 1306,
"x": 182,
"y": 1230,
"w": 39,
"h": 69,
"ox": 0,
......@@ -3100,8 +3109,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_3.png": {
"x": 606,
"y": 1276,
"x": 182,
"y": 1065,
"w": 40,
"h": 69,
"ox": 0,
......@@ -3111,19 +3120,19 @@ exports.ResJson = {
"ro": true
},
"ball_num_4.png": {
"x": 966,
"y": 1001,
"x": 613,
"y": 1182,
"w": 44,
"h": 68,
"ox": 0,
"oy": 0,
"sw": 44,
"sh": 68,
"ro": false
"ro": true
},
"ball_num_5.png": {
"x": 742,
"y": 1409,
"x": 2,
"y": 1498,
"w": 39,
"h": 68,
"ox": 0,
......@@ -3133,8 +3142,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_6.png": {
"x": 324,
"y": 1251,
"x": 182,
"y": 1189,
"w": 39,
"h": 69,
"ox": 0,
......@@ -3144,41 +3153,41 @@ exports.ResJson = {
"ro": true
},
"ball_num_7.png": {
"x": 672,
"y": 1409,
"x": 72,
"y": 1457,
"w": 39,
"h": 68,
"ox": 0,
"oy": 0,
"sw": 39,
"sh": 68,
"ro": true
"ro": false
},
"ball_num_8.png": {
"x": 606,
"y": 1190,
"x": 979,
"y": 908,
"w": 42,
"h": 69,
"ox": 0,
"oy": 0,
"sw": 42,
"sh": 69,
"ro": true
"ro": false
},
"ball_num_9.png": {
"x": 812,
"y": 1368,
"x": 2,
"y": 1457,
"w": 39,
"h": 68,
"ox": 0,
"oy": 0,
"sw": 39,
"sh": 68,
"ro": false
"ro": true
},
"ball_num_black_0.png": {
"x": 496,
"y": 1306,
"x": 182,
"y": 1271,
"w": 38,
"h": 69,
"ox": 0,
......@@ -3188,8 +3197,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_1.png": {
"x": 710,
"y": 378,
"x": 688,
"y": 1008,
"w": 20,
"h": 68,
"ox": 0,
......@@ -3199,8 +3208,8 @@ exports.ResJson = {
"ro": false
},
"ball_num_black_2.png": {
"x": 253,
"y": 1251,
"x": 182,
"y": 1148,
"w": 39,
"h": 69,
"ox": 0,
......@@ -3210,8 +3219,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_3.png": {
"x": 606,
"y": 1234,
"x": 182,
"y": 1023,
"w": 40,
"h": 69,
"ox": 0,
......@@ -3221,30 +3230,30 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_4.png": {
"x": 966,
"y": 931,
"x": 613,
"y": 1136,
"w": 44,
"h": 68,
"ox": 0,
"oy": 0,
"sw": 44,
"sh": 68,
"ro": false
"ro": true
},
"ball_num_black_5.png": {
"x": 742,
"y": 1368,
"x": 124,
"y": 1397,
"w": 39,
"h": 68,
"ox": 0,
"oy": 0,
"sw": 39,
"sh": 68,
"ro": true
"ro": false
},
"ball_num_black_6.png": {
"x": 182,
"y": 1251,
"y": 1107,
"w": 39,
"h": 69,
"ox": 0,
......@@ -3254,8 +3263,8 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_7.png": {
"x": 602,
"y": 1406,
"x": 178,
"y": 1392,
"w": 39,
"h": 68,
"ox": 0,
......@@ -3265,19 +3274,19 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_8.png": {
"x": 606,
"y": 1146,
"x": 979,
"y": 837,
"w": 42,
"h": 69,
"ox": 0,
"oy": 0,
"sw": 42,
"sh": 69,
"ro": true
"ro": false
},
"ball_num_black_9.png": {
"x": 672,
"y": 1368,
"x": 178,
"y": 1351,
"w": 39,
"h": 68,
"ox": 0,
......@@ -3287,30 +3296,30 @@ exports.ResJson = {
"ro": true
},
"ball_num_black_k.png": {
"x": 602,
"y": 1362,
"x": 979,
"y": 1049,
"w": 42,
"h": 68,
"ox": 8,
"oy": 0,
"sw": 50,
"sh": 68,
"ro": true
"ro": false
},
"ball_num_k.png": {
"x": 602,
"y": 1318,
"x": 979,
"y": 979,
"w": 42,
"h": 68,
"ox": 8,
"oy": 0,
"sw": 50,
"sh": 68,
"ro": true
"ro": false
},
"bomb_1.png": {
"x": 874,
"y": 1203,
"x": 2,
"y": 1343,
"w": 120,
"h": 112,
"ox": 90,
......@@ -3320,8 +3329,8 @@ exports.ResJson = {
"ro": false
},
"bomb_2.png": {
"x": 2,
"y": 1019,
"x": 444,
"y": 904,
"w": 242,
"h": 230,
"ox": 25,
......@@ -3353,8 +3362,8 @@ exports.ResJson = {
"ro": false
},
"bomb_5.png": {
"x": 985,
"y": 657,
"x": 986,
"y": 597,
"w": 42,
"h": 36,
"ox": 77,
......@@ -3364,19 +3373,19 @@ exports.ResJson = {
"ro": true
},
"bullet.png": {
"x": 710,
"y": 602,
"x": 979,
"y": 824,
"w": 11,
"h": 43,
"ox": 0,
"oy": 0,
"sw": 11,
"sh": 43,
"ro": false
"ro": true
},
"drop_bullet_0.png": {
"x": 967,
"y": 1497,
"x": 944,
"y": 1060,
"w": 30,
"h": 30,
"ox": 0,
......@@ -3386,8 +3395,8 @@ exports.ResJson = {
"ro": false
},
"drop_bullet_1.png": {
"x": 967,
"y": 1497,
"x": 944,
"y": 1060,
"w": 30,
"h": 30,
"ox": 0,
......@@ -3397,40 +3406,40 @@ exports.ResJson = {
"ro": false
},
"drop_power_0.png": {
"x": 967,
"y": 1529,
"x": 688,
"y": 964,
"w": 28,
"h": 27,
"ox": 0,
"oy": 0,
"sw": 28,
"sh": 27,
"ro": false
"ro": true
},
"drop_power_1.png": {
"x": 395,
"y": 1280,
"x": 688,
"y": 934,
"w": 28,
"h": 27,
"ox": 0,
"oy": 0,
"sw": 28,
"sh": 27,
"ro": false
"ro": true
},
"drop_power_2.png": {
"x": 395,
"y": 1251,
"x": 688,
"y": 904,
"w": 28,
"h": 27,
"ox": 0,
"oy": 0,
"sw": 28,
"sh": 27,
"ro": false
"ro": true
},
"img_UFO_00.png": {
"x": 258,
"x": 264,
"y": 763,
"w": 178,
"h": 164,
......@@ -3441,8 +3450,8 @@ exports.ResJson = {
"ro": false
},
"img_UFO_01.png": {
"x": 677,
"y": 1208,
"x": 710,
"y": 1060,
"w": 178,
"h": 158,
"ox": 6,
......@@ -3452,7 +3461,7 @@ exports.ResJson = {
"ro": false
},
"img_UFO_02.png": {
"x": 2,
"x": 253,
"y": 1251,
"w": 178,
"h": 154,
......@@ -3463,8 +3472,8 @@ exports.ResJson = {
"ro": false
},
"img_UFO_03.png": {
"x": 426,
"y": 1146,
"x": 2,
"y": 1183,
"w": 178,
"h": 158,
"ox": 6,
......@@ -3474,7 +3483,7 @@ exports.ResJson = {
"ro": false
},
"img_UFO_04.png": {
"x": 258,
"x": 264,
"y": 929,
"w": 178,
"h": 160,
......@@ -3485,8 +3494,8 @@ exports.ResJson = {
"ro": false
},
"img_UFO_05.png": {
"x": 694,
"y": 1048,
"x": 253,
"y": 1091,
"w": 178,
"h": 158,
"ox": 6,
......@@ -3496,19 +3505,19 @@ exports.ResJson = {
"ro": false
},
"img_UFO_06.png": {
"x": 857,
"y": 1317,
"x": 433,
"y": 1136,
"w": 178,
"h": 154,
"ox": 6,
"oy": 20,
"sw": 190,
"sh": 180,
"ro": true
"ro": false
},
"img_UFO_07.png": {
"x": 246,
"y": 1091,
"x": 2,
"y": 1023,
"w": 178,
"h": 158,
"ox": 6,
......@@ -3518,8 +3527,8 @@ exports.ResJson = {
"ro": false
},
"main_bullet.png": {
"x": 966,
"y": 877,
"x": 124,
"y": 1343,
"w": 52,
"h": 52,
"ox": 0,
......@@ -3529,30 +3538,30 @@ exports.ResJson = {
"ro": false
},
"main_countdown.png": {
"x": 874,
"y": 1071,
"x": 890,
"y": 1119,
"w": 139,
"h": 130,
"ox": 0,
"oy": 0,
"sw": 139,
"sh": 130,
"ro": false
"ro": true
},
"main_countdown2.png": {
"x": 710,
"y": 578,
"x": 688,
"y": 994,
"w": 12,
"h": 22,
"ox": 0,
"oy": 0,
"sw": 12,
"sh": 22,
"ro": false
"ro": true
},
"main_power.png": {
"x": 966,
"y": 823,
"x": 890,
"y": 1060,
"w": 52,
"h": 52,
"ox": 0,
......@@ -3584,19 +3593,19 @@ exports.ResJson = {
"ro": true
},
"score_num_0.png": {
"x": 567,
"y": 1367,
"x": 683,
"y": 1220,
"w": 33,
"h": 59,
"ox": 0,
"oy": 0,
"sw": 33,
"sh": 59,
"ro": false
"ro": true
},
"score_num_1.png": {
"x": 710,
"y": 518,
"x": 683,
"y": 1148,
"w": 17,
"h": 58,
"ox": 0,
......@@ -3606,8 +3615,8 @@ exports.ResJson = {
"ro": false
},
"score_num_2.png": {
"x": 567,
"y": 1306,
"x": 986,
"y": 763,
"w": 33,
"h": 59,
"ox": 0,
......@@ -3617,8 +3626,8 @@ exports.ResJson = {
"ro": false
},
"score_num_3.png": {
"x": 985,
"y": 762,
"x": 986,
"y": 702,
"w": 34,
"h": 59,
"ox": 0,
......@@ -3628,19 +3637,19 @@ exports.ResJson = {
"ro": false
},
"score_num_4.png": {
"x": 985,
"y": 536,
"x": 613,
"y": 1228,
"w": 37,
"h": 58,
"ox": 0,
"oy": 0,
"sw": 37,
"sh": 58,
"ro": false
"ro": true
},
"score_num_5.png": {
"x": 907,
"y": 1497,
"x": 673,
"y": 1255,
"w": 33,
"h": 58,
"ox": 0,
......@@ -3650,8 +3659,8 @@ exports.ResJson = {
"ro": true
},
"score_num_6.png": {
"x": 985,
"y": 701,
"x": 986,
"y": 641,
"w": 34,
"h": 59,
"ox": 0,
......@@ -3661,8 +3670,8 @@ exports.ResJson = {
"ro": false
},
"score_num_7.png": {
"x": 847,
"y": 1497,
"x": 804,
"y": 1220,
"w": 33,
"h": 58,
"ox": 0,
......@@ -3672,8 +3681,8 @@ exports.ResJson = {
"ro": true
},
"score_num_8.png": {
"x": 985,
"y": 596,
"x": 986,
"y": 536,
"w": 36,
"h": 59,
"ox": 0,
......@@ -3683,15 +3692,15 @@ exports.ResJson = {
"ro": false
},
"score_num_9.png": {
"x": 812,
"y": 1438,
"x": 744,
"y": 1220,
"w": 33,
"h": 58,
"ox": 0,
"oy": 0,
"sw": 33,
"sh": 58,
"ro": false
"ro": true
}
}
},
......@@ -4035,12 +4044,12 @@ exports.ResJson = {
"prizePanelBack.png": {
"x": 243,
"y": 312,
"w": 35,
"h": 35,
"ox": 9,
"oy": 8,
"sw": 53,
"sh": 51,
"w": 52,
"h": 52,
"ox": 12,
"oy": 16,
"sw": 78,
"sh": 80,
"ro": false
},
"receivedBtn.png": {
......@@ -4112,13 +4121,13 @@ exports.ResJson = {
"atlas": {
"drawBtn.png": {
"x": 2,
"y": 279,
"w": 165,
"h": 142,
"y": 146,
"w": 119,
"h": 139,
"ox": 0,
"oy": 0,
"sw": 165,
"sh": 142,
"sw": 119,
"sh": 139,
"ro": true
},
"drawBtn2.png": {
......@@ -4155,37 +4164,37 @@ exports.ResJson = {
"ro": false
},
"newbieBtn.png": {
"x": 146,
"y": 187,
"x": 143,
"y": 182,
"w": 96,
"h": 132,
"h": 135,
"ox": 0,
"oy": 0,
"sw": 96,
"sh": 132,
"sh": 135,
"ro": true
},
"rankBtn.png": {
"x": 146,
"y": 85,
"w": 100,
"h": 132,
"x": 143,
"y": 84,
"w": 96,
"h": 136,
"ox": 0,
"oy": 0,
"sw": 100,
"sh": 132,
"sw": 96,
"sh": 136,
"ro": true
},
"recordBtn.png": {
"x": 280,
"y": 146,
"x": 2,
"y": 279,
"w": 157,
"h": 50,
"ox": 0,
"oy": 0,
"sw": 157,
"sh": 50,
"ro": false
"ro": true
},
"ruleBtn.png": {
"x": 451,
......@@ -4202,22 +4211,22 @@ exports.ResJson = {
"x": 2,
"y": 2,
"w": 280,
"h": 81,
"h": 80,
"ox": 0,
"oy": 0,
"sw": 280,
"sh": 81,
"sh": 80,
"ro": false
},
"task_Btn.png": {
"x": 2,
"y": 85,
"x": 281,
"y": 146,
"w": 96,
"h": 132,
"h": 135,
"ox": 0,
"oy": 0,
"sw": 96,
"sh": 132,
"sh": 135,
"ro": true
}
}
......@@ -4468,7 +4477,7 @@ exports.ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1593615468/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1598514421/resource/"
};
......@@ -7372,33 +7381,33 @@ var DxqPlayScene = (function (_super) {
var bg = new FYGE.Sprite(RES_1.RES.getRes("main_bg.jpg"));
_this.node.addChild(bg);
var cdbg = new FYGE.Sprite(RES_1.RES.getRes("main_countdown.png"));
cdbg.position.set(612, 26 + DxqPlayScene.OFFSET_Y);
cdbg.position.set(612, 26 + DxqPlayScene.OFFSET_Y + 100);
_this.node.addChild(cdbg);
var cdbg2 = new FYGE.Sprite(RES_1.RES.getRes("main_countdown2.png"));
cdbg2.position.set(685, 61 + DxqPlayScene.OFFSET_Y);
cdbg2.position.set(685, 61 + DxqPlayScene.OFFSET_Y + 100);
cdbg2.anchorX = 6;
cdbg2.anchorY = 17;
_this.node.addChild(cdbg2);
_this.cdline = cdbg2;
var bulletIcon = new FYGE.Sprite(RES_1.RES.getRes("main_bullet.png"));
bulletIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y);
bulletIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y + 100);
_this.bulletScoreLabel = Tools_1.Tool.getText("0", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT, 500);
_this.bulletScoreLabel.x = 100;
_this.bulletScoreLabel.y = 42 + DxqPlayScene.OFFSET_Y;
_this.bulletScoreLabel.y = 42 + DxqPlayScene.OFFSET_Y + 100;
var powerIcon = new FYGE.Sprite(RES_1.RES.getRes("main_power.png"));
powerIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y + 72);
powerIcon.position.set(30, 30 + DxqPlayScene.OFFSET_Y + 72 + 100);
_this.powerScoreLabel = Tools_1.Tool.getText("0%", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT, 500);
_this.powerScoreLabel.x = 100;
_this.powerScoreLabel.y = 114 + DxqPlayScene.OFFSET_Y;
_this.powerScoreLabel.y = 114 + DxqPlayScene.OFFSET_Y + 100;
var textures = {};
for (var i = 0; i < 10; i++)
textures[i] = RES_1.RES.getRes("score_num_" + i + ".png");
var labelScore2 = new FYGE.BitmapText(textures);
labelScore2.textAlign = FYGE.TEXT_ALIGN.CENTER;
labelScore2.y = DxqPlayScene.OFFSET_Y + 50;
labelScore2.y = DxqPlayScene.OFFSET_Y + 50 + 100;
_this.totalScoreLabel = labelScore2;
_this.timeLabel = Tools_1.Tool.getText("00:00", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT);
_this.timeLabel.position.set(656, 117 + DxqPlayScene.OFFSET_Y);
_this.timeLabel.position.set(656, 117 + DxqPlayScene.OFFSET_Y + 100);
_this.node.addChild(bulletIcon);
_this.node.addChild(_this.bulletScoreLabel);
_this.node.addChild(powerIcon);
......@@ -9700,7 +9709,7 @@ var Tip2Panel = (function (_super) {
TipPanel_1.centerImage(ruleBg);
this.addChild(ruleBg);
var _a = TaoBaoNet_1.getTbData(TaoBaoNet_1.TbNetName.filaStarGetActivityBaseInfoById).data, drawLimit = _a.drawLimit, image = _a.drawPrize.image;
var content = "\u6392\u540D\u524D" + drawLimit + "\uFF0C\u989D\u5916\u83B7\u5F97\u62BD\u53D6\u5764\u5764\u4EB2\u7B14\u7B7E\u540D\u673A\u4F1A\uFF01";
var content = "\u6392\u540D\u524D" + drawLimit + "\uFF0C\u989D\u5916\u83B7\u5F97\u62BD\u8521\u5F90\u5764\u4EB2\u7B14\u7B7E\u540D\u7167\u673A\u4F1A\uFF01";
var text = Tools_1.Tool.getText(content, 30, '#091631', FYGE.TEXT_ALIGN.LEFT, 493);
text.lineType = FYGE.TEXT_lINETYPE.MULTI;
ruleBg.addChild(text);
......@@ -9787,7 +9796,7 @@ var TipFailPanel = (function (_super) {
var ruleBg = Tools_1.Tool.getSprite("tipFailPanelBg.png");
TipPanel_1.centerImage(ruleBg);
this.addChild(ruleBg);
var content = "\u8FD0\u6C14\u5DEE\u4E86\u4E00\u4E22\u4E22\n\u4F60\u4E0E" + getCaixukunTime_1.getCaixukunName() + "\u4EB2\u7B14\u7B7E\u540D\u64E6\u80A9\u800C\u8FC7";
var content = "\u8FD0\u6C14\u5DEE\u4E86\u4E00\u4E22\u4E22\n\u4F60\u4E0E" + getCaixukunTime_1.getCaixukunName() + "\u4EB2\u7B14\u7B7E\u540D\u7167\u64E6\u80A9\u800C\u8FC7";
var text = Tools_1.Tool.getText(content, 30, '#091631', FYGE.TEXT_ALIGN.CENTER, ruleBg.width);
text.lineType = FYGE.TEXT_lINETYPE.MULTI;
ruleBg.addChild(text);
......@@ -9879,7 +9888,7 @@ var TipPanel = (function (_super) {
exports.centerImage(ruleBg);
this.addChild(ruleBg);
var _a = TaoBaoNet_1.getTbData(TaoBaoNet_1.TbNetName.filaStarGetActivityBaseInfoById).data, drawLimit = _a.drawLimit, image = _a.drawPrize.image;
var content = "\u6D3B\u52A8\u7ED3\u675F\u6392\u540D\u8FBE\u5230\u524D" + drawLimit + "\u540D\u7684\u7528\u6237\uFF0C\n\u6709\u673A\u4F1A\u62BD\u53D6" + getCaixukunTime_1.getCaixukunName() + "\u4EB2\u7B14\u7B7E\u540D\uFF01";
var content = "\u6D3B\u52A8\u7ED3\u675F\u6392\u540D\u8FBE\u5230\u524D" + drawLimit + "\u540D\u7684\u7528\u6237\uFF0C\n\u6709\u673A\u4F1A\u62BD" + getCaixukunTime_1.getCaixukunName() + "\u4EB2\u7B14\u7B7E\u540D\u7167\uFF01";
var text = Tools_1.Tool.getText(content, 30, '#091631', FYGE.TEXT_ALIGN.CENTER, ruleBg.width);
text.lineType = FYGE.TEXT_lINETYPE.MULTI;
ruleBg.addChild(text);
......@@ -10040,9 +10049,9 @@ var PrizeItem = (function (_super) {
_this.prizeImg.width = 120;
_this.prizeImg.height = 120;
_this.addChild(_this.prizeImg);
_this.rank = Tools_1.Tool.getText("", 22, "#000", FYGE.TEXT_ALIGN.CENTER, 120);
_this.rank = Tools_1.Tool.getText("", 20, "#000", FYGE.TEXT_ALIGN.CENTER, 140);
_this.addChild(_this.rank);
_this.rank.x = 0;
_this.rank.x = -10;
_this.rank.y = 133;
return _this;
}
......@@ -10357,10 +10366,10 @@ var RulePanel = (function (_super) {
ruleBg.position.set((750 - ruleBg.width) / 2, 430);
var rule = TaoBaoNet_1.getTbData(TaoBaoNet_1.TbNetName.filaStarGetActivityBaseInfoById).data.rule;
var arr = rule;
var text = Tools_1.Tool.getText(arr, 24, '#091631', FYGE.TEXT_ALIGN.LEFT, 540);
var text = Tools_1.Tool.getText(arr, 24, '#091631', FYGE.TEXT_ALIGN.LEFT, 520);
text.lineType = FYGE.TEXT_lINETYPE.MULTI;
text.y = 0;
var scrollPage = new FYGE.ScrollPage(540, 450, text.textHeight);
var scrollPage = new FYGE.ScrollPage(550, 450, text.textHeight);
scrollPage.x = 50;
scrollPage.y = 150;
scrollPage.children[1].addChild(text);
......@@ -10472,6 +10481,9 @@ var TaskItem = (function (_super) {
case TASK_TYPE_1.TASK_TYPE.FOLLOW:
return 'follow.png';
break;
default:
return '';
break;
}
};
TaskItem.prototype.getData = function () {
......@@ -10582,7 +10594,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true });
var toastCtrl_1 = __webpack_require__(/*! ./../../module/ctrls/toastCtrl */ "./module/ctrls/toastCtrl.ts");
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
......@@ -10595,7 +10606,6 @@ var doRecord_1 = __webpack_require__(/*! ../ctrls/doRecord */ "./src/ctrls/doRec
var sendLog_1 = __webpack_require__(/*! ../ctrls/sendLog */ "./src/ctrls/sendLog.ts");
var LogType_1 = __webpack_require__(/*! ../datas/LogType */ "./src/datas/LogType.ts");
var getVipInfo_1 = __webpack_require__(/*! ../ctrls/getVipInfo */ "./src/ctrls/getVipInfo.ts");
var getCaixukunTime_1 = __webpack_require__(/*! ../ctrls/getCaixukunTime */ "./src/ctrls/getCaixukunTime.ts");
var AssistScene = (function (_super) {
__extends(AssistScene, _super);
function AssistScene() {
......@@ -10614,10 +10624,6 @@ var AssistScene = (function (_super) {
assistBG.x = 0;
assistBG.y = 0;
this.addChild(assistBG);
var hintTxt = Tools_1.Tool.getText("", 24, "#ffffff");
hintTxt.text = getCaixukunTime_1.getCaixukunName() + "\u4EB2\u7B14\u7B7E\u540D\u3001\u8001\u7239\u978B\u3001T\u6064";
hintTxt.position.set((750 - hintTxt.textWidth) / 2, 570);
this.addChild(hintTxt);
var assistBtn = this._assistBtn = new FYGE.Sprite(RES_1.RES.getRes("assistBtn.png"));
assistBtn.anchorTexture.set(0.5, 0.5);
assistBtn.position.set(750 / 2, 1120);
......@@ -10970,7 +10976,7 @@ var RecordScene = (function (_super) {
startBg = Tools_1.Tool.getRect(layers_1.layers.stageWidth, layers_1.layers.stageHeight, 0xe1eded);
titleBG = new FYGE.Sprite(RES_1.RES.getRes('titleBG.png'));
titleBG.x = 0;
titleBG.y = -100;
titleBG.y = 0;
this.addChild(startBg);
this.addChild(titleBG);
tip = Tools_1.Tool.getText("您还未中奖,快去游戏赢取大奖", 40);
......@@ -10978,14 +10984,14 @@ var RecordScene = (function (_super) {
this.addChild(tip);
this.addChild(titleText);
titleText.x = 375 - titleText.textWidth / 2;
titleText.y = 45;
titleText.y = 145;
tip.x = 375 - tip.textWidth / 2;
tip.y = 400;
tip.y = 500;
timeText = Tools_1.Tool.getText("", 22, "#091631");
this.addChild(timeText);
backBtn = new FYGE.Sprite(RES_1.RES.getRes('prizePanelBack.png'));
backBtn.x = 10;
backBtn.y = 30;
backBtn.y = 160;
this.addChild(backBtn);
backBtn.addEventListener(FYGE.MouseEvent.CLICK, function () {
ctrls_1.changeScene(StartScene_1.StartScene);
......@@ -11010,7 +11016,7 @@ var RecordScene = (function (_super) {
if (data.list.length > 0) {
tip.visible = false;
prizeList = new FYGE.ScrollList(PrizeListItem, layers_1.layers.stageWidth, 220, layers_1.layers.stageWidth, layers_1.layers.stageHeight - 150);
prizeList.y = 140;
prizeList.y = 240;
prizeList.updateData(data.list);
this.addChild(prizeList);
}
......@@ -11358,7 +11364,6 @@ var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var doGetExtraPrize_1 = __webpack_require__(/*! ../ctrls/doGetExtraPrize */ "./src/ctrls/doGetExtraPrize.ts");
var getCaixukunTime_1 = __webpack_require__(/*! ../ctrls/getCaixukunTime */ "./src/ctrls/getCaixukunTime.ts");
var getGameInfo_1 = __webpack_require__(/*! ../ctrls/getGameInfo */ "./src/ctrls/getGameInfo.ts");
var getInviteInfo_1 = __webpack_require__(/*! ../ctrls/getInviteInfo */ "./src/ctrls/getInviteInfo.ts");
var getMyRankPrize_1 = __webpack_require__(/*! ../ctrls/getMyRankPrize */ "./src/ctrls/getMyRankPrize.ts");
......@@ -11383,6 +11388,7 @@ var RecordScene_1 = __webpack_require__(/*! ./RecordScene */ "./src/scenes/Recor
var ShootPlanet_1 = __webpack_require__(/*! ./ShootPlanet */ "./src/scenes/ShootPlanet.ts");
var musicFlag_1 = __webpack_require__(/*! ../datas/musicFlag */ "./src/datas/musicFlag.ts");
var SoundMgr_1 = __webpack_require__(/*! ../Mgr/SoundMgr */ "./src/Mgr/SoundMgr.ts");
var doRecord_1 = __webpack_require__(/*! ../ctrls/doRecord */ "./src/ctrls/doRecord.ts");
exports.svgaPool = {};
var StartScene = (function (_super) {
__extends(StartScene, _super);
......@@ -11390,10 +11396,11 @@ var StartScene = (function (_super) {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.list = ['1000.png', '2000.png', '8000.png', 'revive.png'];
_this.onStartBtnClick = function () { return __awaiter(_this, void 0, void 0, function () {
var _a, success, code, id, message;
var _a, success, code, data, message;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
this.startBtnTewwn();
if (global_1.getBeforeStartTime()) {
return [2, ctrls_1.showToast('活动未开始')];
}
......@@ -11407,12 +11414,19 @@ var StartScene = (function (_super) {
console.log("活动进行中");
return [4, startGame_1.default()];
case 1:
_a = _b.sent(), success = _a.success, code = _a.code, id = _a.data.id, message = _a.message;
_a = _b.sent(), success = _a.success, code = _a.code, data = _a.data, message = _a.message;
if (success) {
this.getVipInfo("playGame");
ctrls_1.changeScene(ShootPlanet_1.ShootPlanet);
sendLog_1.default(LogType_1.default.startGameSuccess);
}
else {
setTimeout(function () {
console.log('会员地址', data);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.navigateToOutside, { url: data });
}, 1000);
return [2, ctrls_1.showToast("参与入会就可参与活动哦")];
}
return [2];
}
});
......@@ -11445,6 +11459,7 @@ var StartScene = (function (_super) {
return [2, ctrls_1.showToast('活动未开始')];
}
console.log('跳转新人礼链接');
doRecord_1.default('rookieGift');
sendLog_1.default(LogType_1.default.clickNewbieIcon);
setTimeout(function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.navigateToOutside, { url: global_1.getNewbieLink() });
......@@ -11467,7 +11482,7 @@ var StartScene = (function (_super) {
};
StartScene.prototype.start = function () {
return __awaiter(this, void 0, void 0, function () {
var btn, timeString, namestr, adstr, ruleBtn, ruleBtnY, recordBtn, musicBtn_Open, musicBtn_OpenY, musicBtn_Close, musicBtn_CloseY, rankBtn, rankBtnY, drawbtnName, drawBtn, drawBtnY, newbieBtn, newbieBtnY, taskBtn, taskBtnY, result;
var btn, timeString, ruleBtn, ruleBtnY, recordBtn, musicBtn_Open, musicBtn_Close, rankBtn, rankBtnY, drawbtnName, drawBtn, drawBtnY, newbieBtn, newbieBtnY, taskBtn, taskBtnY, result;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
......@@ -11482,45 +11497,25 @@ var StartScene = (function (_super) {
if (global_1.getIsFocusShop()) {
sendLog_1.default(LogType_1.default.visitFavorShop);
}
btn = new FYGE.Button(RES_1.RES.getRes("startBtn.png"));
btn = this._startBtn = new FYGE.Button(RES_1.RES.getRes("startBtn.png"));
timeString = Tools_1.Tool.getText("", 26, "#ffffff");
timeString.text = "免费次数:";
timeString.position.set(380, 925);
timeString.position.set(290, 1075);
this.addChild(timeString);
namestr = Tools_1.Tool.getText("", 28, "#ffffff", FYGE.TEXT_ALIGN.CENTER, 384);
namestr.lineType = FYGE.TEXT_lINETYPE.MULTI;
namestr.textAlign = FYGE.TEXT_ALIGN.CENTER;
namestr.text = "\u950B\u5C1A\u529BMAX\n- \u8D62" + getCaixukunTime_1.getCaixukunName() + "\u7B7E\u540D -";
namestr.position.set(257, 720);
this.addChild(namestr);
adstr = Tools_1.Tool.getText("", 22, "#ffffff", FYGE.TEXT_ALIGN.CENTER, 384);
adstr.lineType = FYGE.TEXT_lINETYPE.MULTI;
adstr.textAlign = FYGE.TEXT_ALIGN.CENTER;
adstr.text = "\u8001\u7239\u978B\u3001T\u6064\u8D85\u591A\u597D\u793C\u7B49\u4F60\u62FF";
adstr.position.set(257, 810);
this.addChild(adstr);
this.times = Tools_1.Tool.getText("", 26, "#ffffff");
this.times.text = "0次";
btn.anchorY = btn.height / 2;
btn.anchorX = btn.width / 2;
btn.position.set(310, 970);
this.times.position.set(500, 925);
btn.position.set(470 / 2, 970);
this.times.position.set(410, 1075);
this.addChild(this.times);
this.addChild(btn);
btn.addEventListener(FYGE.MouseEvent.CLICK, this.onStartBtnClick, this);
FYGE.Tween.get(btn, { loop: true })
.to({ scaleX: 1.15, scaleY: 1.15 }, 400)
.wait(300)
.to({ scaleX: 0.95, scaleY: 0.95 }, 100)
.to({ scaleX: 1.1, scaleY: 1.1 }, 100)
.to({ scaleX: 0.97, scaleY: 0.97 }, 100)
.to({ scaleX: 1.05, scaleY: 1.05 }, 100)
.to({ scaleX: 1, scaleY: 1 }, 100)
.wait(300);
this.startBtnTewwn();
ruleBtn = new FYGE.Button(RES_1.RES.getRes("ruleBtn.png"));
ruleBtnY = 235;
ruleBtnY = 280;
if (layers_1.layers.stageHeight < 1206) {
ruleBtnY = layers_1.layers.stageOffsetY + 235;
ruleBtnY = layers_1.layers.stageOffsetY + 280;
}
ruleBtn.position.set(-1, ruleBtnY);
this.addChild(ruleBtn);
......@@ -11540,11 +11535,7 @@ var StartScene = (function (_super) {
ctrls_1.changeScene(RecordScene_1.RecordScene);
});
musicBtn_Open = this._musicBtnOpen = new FYGE.Button(RES_1.RES.getRes("music_Open.png"));
musicBtn_OpenY = 235;
if (layers_1.layers.stageHeight < 1206) {
musicBtn_OpenY = layers_1.layers.stageOffsetY + 235;
}
musicBtn_Open.position.set(675, musicBtn_OpenY);
musicBtn_Open.position.set(675, ruleBtnY + ruleBtn.height + 20);
musicBtn_Open.visible = musicFlag_1.getMusicOpen();
musicBtn_Open.addEventListener(FYGE.MouseEvent.CLICK, function () {
console.log("关闭音乐");
......@@ -11553,11 +11544,7 @@ var StartScene = (function (_super) {
_this.setMusicBtnState();
});
musicBtn_Close = this._musicBtnClose = new FYGE.Button(RES_1.RES.getRes("music_Close.png"));
musicBtn_CloseY = 235;
if (layers_1.layers.stageHeight < 1206) {
musicBtn_CloseY = layers_1.layers.stageOffsetY + 235;
}
musicBtn_Close.position.set(675, musicBtn_CloseY);
musicBtn_Close.position.set(675, ruleBtnY + ruleBtn.height + 20);
musicBtn_Close.visible = !musicFlag_1.getMusicOpen();
musicBtn_Close.addEventListener(FYGE.MouseEvent.CLICK, function () {
console.log("开启音乐");
......@@ -11576,7 +11563,7 @@ var StartScene = (function (_super) {
rankBtn.position.set(83, rankBtnY);
this.addChild(rankBtn);
rankBtn.addEventListener(FYGE.MouseEvent.CLICK, this.onRankBtnClick);
drawbtnName = Date.now() > getCaixukunTime_1.default() ? "drawBtn2.png" : "drawBtn.png";
drawbtnName = "drawBtn.png";
drawBtn = new FYGE.Button(RES_1.RES.getRes(drawbtnName));
drawBtnY = 1255;
if (layers_1.layers.stageHeight < 1206) {
......@@ -11624,6 +11611,18 @@ var StartScene = (function (_super) {
});
});
};
StartScene.prototype.startBtnTewwn = function () {
FYGE.Tween.removeTweens(this._startBtn);
FYGE.Tween.get(this._startBtn, { loop: true })
.to({ scaleX: 1.15, scaleY: 1.15 }, 400)
.wait(300)
.to({ scaleX: 0.95, scaleY: 0.95 }, 100)
.to({ scaleX: 1.1, scaleY: 1.1 }, 100)
.to({ scaleX: 0.97, scaleY: 0.97 }, 100)
.to({ scaleX: 1.05, scaleY: 1.05 }, 100)
.to({ scaleX: 1, scaleY: 1 }, 100)
.wait(300);
};
StartScene.prototype.onGetMyRankPrize = function (result) {
var getMyRankPrizeData = result[0], getRankListData = result[1];
if (getMyRankPrizeData.success && getRankListData.data.rank != '-') {
......
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