Commit 3170eebe authored by spc's avatar spc

modified: scripts/copyJs.js

parent c84a6d20
...@@ -5054,6 +5054,7 @@ exports.FailedPanel = void 0; ...@@ -5054,6 +5054,7 @@ exports.FailedPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var FailedPanel = (function (_super) { var FailedPanel = (function (_super) {
__extends(FailedPanel, _super); __extends(FailedPanel, _super);
...@@ -5075,12 +5076,16 @@ var FailedPanel = (function (_super) { ...@@ -5075,12 +5076,16 @@ var FailedPanel = (function (_super) {
playAgainBtn.x = bg.width - playAgainBtn.width >> 1; playAgainBtn.x = bg.width - playAgainBtn.width >> 1;
playAgainBtn.y = 350; playAgainBtn.y = 350;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
}; };
FailedPanel.prototype.back = function () { FailedPanel.prototype.back = function () {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}; };
FailedPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return FailedPanel; return FailedPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.FailedPanel = FailedPanel; exports.FailedPanel = FailedPanel;
...@@ -5261,6 +5266,7 @@ exports.SuccessNoAwardPanel = void 0; ...@@ -5261,6 +5266,7 @@ exports.SuccessNoAwardPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts"); var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var SuccessNoAwardPanel = (function (_super) { var SuccessNoAwardPanel = (function (_super) {
...@@ -5287,12 +5293,16 @@ var SuccessNoAwardPanel = (function (_super) { ...@@ -5287,12 +5293,16 @@ var SuccessNoAwardPanel = (function (_super) {
playAgainBtn.x = bg.width - playAgainBtn.width >> 1; playAgainBtn.x = bg.width - playAgainBtn.width >> 1;
playAgainBtn.y = 350; playAgainBtn.y = 350;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
}; };
SuccessNoAwardPanel.prototype.back = function () { SuccessNoAwardPanel.prototype.back = function () {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}; };
SuccessNoAwardPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return SuccessNoAwardPanel; return SuccessNoAwardPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.SuccessNoAwardPanel = SuccessNoAwardPanel; exports.SuccessNoAwardPanel = SuccessNoAwardPanel;
...@@ -5327,6 +5337,7 @@ exports.SuccessPanel = void 0; ...@@ -5327,6 +5337,7 @@ exports.SuccessPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts"); var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var SuccessPanel = (function (_super) { var SuccessPanel = (function (_super) {
...@@ -5358,7 +5369,7 @@ var SuccessPanel = (function (_super) { ...@@ -5358,7 +5369,7 @@ var SuccessPanel = (function (_super) {
playAgainBtn.x = (bg.width - playAgainBtn.width >> 1) + bg.width / 4; playAgainBtn.x = (bg.width - playAgainBtn.width >> 1) + bg.width / 4;
playAgainBtn.y = 490; playAgainBtn.y = 490;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
var seePrizeBtn = Ins_1.Ins.initSprite("9152efa4-2647-4354-9aec-7e23eb02bc22"); var seePrizeBtn = Ins_1.Ins.initSprite("9152efa4-2647-4354-9aec-7e23eb02bc22");
seePrizeBtn.x = (bg.width - seePrizeBtn.width >> 1) - bg.width / 4; seePrizeBtn.x = (bg.width - seePrizeBtn.width >> 1) - bg.width / 4;
seePrizeBtn.y = 490; seePrizeBtn.y = 490;
...@@ -5373,6 +5384,10 @@ var SuccessPanel = (function (_super) { ...@@ -5373,6 +5384,10 @@ var SuccessPanel = (function (_super) {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.seePrize, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.seePrize, {}, function (s, res) { console.log('backToPage'); });
}; };
SuccessPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return SuccessPanel; return SuccessPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.SuccessPanel = SuccessPanel; exports.SuccessPanel = SuccessPanel;
...@@ -15028,6 +15043,7 @@ var Star = (function (_super) { ...@@ -15028,6 +15043,7 @@ var Star = (function (_super) {
_this.pinkStar = Ins_1.Ins.initSprite("5c5a81d6-4d33-4332-b4d8-a5947eedfa67"); _this.pinkStar = Ins_1.Ins.initSprite("5c5a81d6-4d33-4332-b4d8-a5947eedfa67");
_this.tipText = Tools_1.Tools.getText("1000分", 20); _this.tipText = Tools_1.Tools.getText("1000分", 20);
_this.lightCircle = new lightCircle_1.LightCircle(); _this.lightCircle = new lightCircle_1.LightCircle();
_this.isBling = false;
_this.addChild(_this.starContainer); _this.addChild(_this.starContainer);
_this.starContainer.addChild(_this.bg); _this.starContainer.addChild(_this.bg);
_this.starContainer.anchorX = _this.bg.width >> 1; _this.starContainer.anchorX = _this.bg.width >> 1;
...@@ -15049,11 +15065,16 @@ var Star = (function (_super) { ...@@ -15049,11 +15065,16 @@ var Star = (function (_super) {
} }
Star.prototype.bling = function () { Star.prototype.bling = function () {
var _this = this; var _this = this;
this.isBling = true;
this.lightCircle.play(); this.lightCircle.play();
FYGE.Tween.get(this.starContainer).to({ scaleX: 0.3, scaleY: 0.3 }, 200).call(function () { FYGE.Tween.get(this.starContainer).to({ scaleX: 0.3, scaleY: 0.3 }, 200).call(function () {
_this.pinkStar.visible = true; _this.pinkStar.visible = true;
}).to({ scaleX: 1.3, scaleY: 1.3 }, 200).to({ scaleX: 1, scaleY: 1 }, 100); }).to({ scaleX: 1.3, scaleY: 1.3 }, 200).to({ scaleX: 1, scaleY: 1 }, 100);
}; };
Star.prototype.dark = function () {
this.isBling = false;
this.pinkStar.visible = false;
};
return Star; return Star;
}(FYGE.Container)); }(FYGE.Container));
exports.Star = Star; exports.Star = Star;
...@@ -15146,6 +15167,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -15146,6 +15167,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.XxlScene = void 0; exports.XxlScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts"); var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts"); var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var ObjectPool_1 = __webpack_require__(/*! ./ObjectPool */ "./src/xiaoxiaole/ObjectPool.ts"); var ObjectPool_1 = __webpack_require__(/*! ./ObjectPool */ "./src/xiaoxiaole/ObjectPool.ts");
...@@ -15252,6 +15274,12 @@ var XxlScene = (function (_super) { ...@@ -15252,6 +15274,12 @@ var XxlScene = (function (_super) {
this.addChild(this.bg); this.addChild(this.bg);
this.x = (Ins_1.Ins.stageW - 750) >> 1; this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1; this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 40 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
this.topContainer = new FYGE.Container(); this.topContainer = new FYGE.Container();
this.topContainer.y = 220; this.topContainer.y = 220;
this.addChild(this.topContainer); this.addChild(this.topContainer);
...@@ -15578,9 +15606,18 @@ var XxlScene = (function (_super) { ...@@ -15578,9 +15606,18 @@ var XxlScene = (function (_super) {
this.level = 3; this.level = 3;
this.llevelText.text = "第" + this.level + "关"; this.llevelText.text = "第" + this.level + "关";
this.difficulty = 5; this.difficulty = 5;
if (!this.star1.isBling) {
this.star1.bling();
}
this.star2.bling(); this.star2.bling();
} }
else if (this.userScore >= 3000) { else if (this.userScore >= 3000) {
if (!this.star1.isBling) {
this.star1.bling();
}
if (!this.star2.isBling) {
this.star2.bling();
}
this.star3.bling(); this.star3.bling();
this.gameOver(); this.gameOver();
} }
...@@ -15604,6 +15641,7 @@ var XxlScene = (function (_super) { ...@@ -15604,6 +15641,7 @@ var XxlScene = (function (_super) {
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)]; return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)];
case 1: case 1:
prizeInfo = _a.sent(); prizeInfo = _a.sent();
Main_1.GDispatcher.addEventListener("gameReset", this.reset, this);
if (this.userInfo.win) { if (this.userInfo.win) {
prize = prizeInfo.data; prize = prizeInfo.data;
if (prize.type <= 3) { if (prize.type <= 3) {
...@@ -15913,6 +15951,7 @@ var XxlScene = (function (_super) { ...@@ -15913,6 +15951,7 @@ var XxlScene = (function (_super) {
}; };
XxlScene.prototype.refresh = function () { XxlScene.prototype.refresh = function () {
var _this = this; var _this = this;
this.g.clear();
var circleItems = this.circleItems; var circleItems = this.circleItems;
circleItems.forEach(function (co) { circleItems.forEach(function (co) {
_this.emptyHexIndices.push(co.index); _this.emptyHexIndices.push(co.index);
...@@ -15941,9 +15980,62 @@ var XxlScene = (function (_super) { ...@@ -15941,9 +15980,62 @@ var XxlScene = (function (_super) {
}; };
XxlScene.prototype.gameStart = function () { XxlScene.prototype.gameStart = function () {
this.rightUserContainer.visible = true; this.rightUserContainer.visible = true;
this.timeNum = XxlConfig_1.config.time;
this.lt = 0;
this.tt = 0;
this.isGameStart = true; this.isGameStart = true;
Main_1.GDispatcher.removeEventListener("MatchCompelete", this.gameStart); Main_1.GDispatcher.removeEventListener("MatchCompelete", this.gameStart);
}; };
XxlScene.prototype.reset = function () {
return __awaiter(this, void 0, void 0, function () {
var userInfoRes;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.selectItems.splice(0);
this.refresh();
this.isGameEnd = false;
this.isGameStart = false;
this.userScore = 0;
this.rightUserContainer.visible = false;
this.lscore.text = "0";
this.rscore.text = "0";
this.llevelText.text = "第一关";
this.rlevelText.text = "第一关";
this.rect.x = this.rectX;
this.star1.dark();
this.star2.dark();
this.star3.dark();
this.timeNum = XxlConfig_1.config.time;
this.time.text = this.timeNum + "";
if (XxlConfig_1.config.time >= 100) {
this.time.textWidth = 80;
}
else if (XxlConfig_1.config.time >= 10) {
this.time.textWidth = 65;
}
else {
this.time.textWidth = 50;
}
this.time.x = Ins_1.Ins.stageW / 2 - this.time.textWidth / 2 - 15;
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})];
case 1:
userInfoRes = _a.sent();
this.userInfo = userInfoRes.data;
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
console.log("没有游戏次数");
}
else {
this.robot = new Robot_1.Robot(!this.userInfo.win);
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, this.userInfo);
this.ravatar.texture = FYGE.Sprite.fromUrl(this.userInfo.fakeUserImgUrl).texture;
this.rnickname.text = this.userInfo.fakeUserName;
}
return [2];
}
});
});
};
XxlScene.prototype.updateFrame = function () { XxlScene.prototype.updateFrame = function () {
if (!this.isGameStart) { if (!this.isGameStart) {
return; return;
...@@ -16000,6 +16092,7 @@ var XxlScene = (function (_super) { ...@@ -16000,6 +16092,7 @@ var XxlScene = (function (_super) {
var that = this; var that = this;
that.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, that.mouseDown, that); that.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, that.mouseDown, that);
that.removeEventListener(FYGE.MouseEvent.MOUSE_UP, that.mouseUp, that); that.removeEventListener(FYGE.MouseEvent.MOUSE_UP, that.mouseUp, that);
Main_1.GDispatcher.removeEventListener("gameReset", this.reset);
}; };
return XxlScene; return XxlScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5056,6 +5056,7 @@ exports.FailedPanel = void 0; ...@@ -5056,6 +5056,7 @@ exports.FailedPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var FailedPanel = (function (_super) { var FailedPanel = (function (_super) {
__extends(FailedPanel, _super); __extends(FailedPanel, _super);
...@@ -5077,12 +5078,16 @@ var FailedPanel = (function (_super) { ...@@ -5077,12 +5078,16 @@ var FailedPanel = (function (_super) {
playAgainBtn.x = bg.width - playAgainBtn.width >> 1; playAgainBtn.x = bg.width - playAgainBtn.width >> 1;
playAgainBtn.y = 350; playAgainBtn.y = 350;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
}; };
FailedPanel.prototype.back = function () { FailedPanel.prototype.back = function () {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}; };
FailedPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return FailedPanel; return FailedPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.FailedPanel = FailedPanel; exports.FailedPanel = FailedPanel;
...@@ -5263,6 +5268,7 @@ exports.SuccessNoAwardPanel = void 0; ...@@ -5263,6 +5268,7 @@ exports.SuccessNoAwardPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts"); var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var SuccessNoAwardPanel = (function (_super) { var SuccessNoAwardPanel = (function (_super) {
...@@ -5289,12 +5295,16 @@ var SuccessNoAwardPanel = (function (_super) { ...@@ -5289,12 +5295,16 @@ var SuccessNoAwardPanel = (function (_super) {
playAgainBtn.x = bg.width - playAgainBtn.width >> 1; playAgainBtn.x = bg.width - playAgainBtn.width >> 1;
playAgainBtn.y = 350; playAgainBtn.y = 350;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
}; };
SuccessNoAwardPanel.prototype.back = function () { SuccessNoAwardPanel.prototype.back = function () {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}; };
SuccessNoAwardPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return SuccessNoAwardPanel; return SuccessNoAwardPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.SuccessNoAwardPanel = SuccessNoAwardPanel; exports.SuccessNoAwardPanel = SuccessNoAwardPanel;
...@@ -5329,6 +5339,7 @@ exports.SuccessPanel = void 0; ...@@ -5329,6 +5339,7 @@ exports.SuccessPanel = void 0;
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts"); var Panel_1 = __webpack_require__(/*! ../../module/views/Panel */ "./module/views/Panel.ts");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts"); var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var SuccessPanel = (function (_super) { var SuccessPanel = (function (_super) {
...@@ -5360,7 +5371,7 @@ var SuccessPanel = (function (_super) { ...@@ -5360,7 +5371,7 @@ var SuccessPanel = (function (_super) {
playAgainBtn.x = (bg.width - playAgainBtn.width >> 1) + bg.width / 4; playAgainBtn.x = (bg.width - playAgainBtn.width >> 1) + bg.width / 4;
playAgainBtn.y = 490; playAgainBtn.y = 490;
this.addChild(playAgainBtn); this.addChild(playAgainBtn);
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this); playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.playAgain, this);
var seePrizeBtn = Ins_1.Ins.initSprite("9152efa4-2647-4354-9aec-7e23eb02bc22"); var seePrizeBtn = Ins_1.Ins.initSprite("9152efa4-2647-4354-9aec-7e23eb02bc22");
seePrizeBtn.x = (bg.width - seePrizeBtn.width >> 1) - bg.width / 4; seePrizeBtn.x = (bg.width - seePrizeBtn.width >> 1) - bg.width / 4;
seePrizeBtn.y = 490; seePrizeBtn.y = 490;
...@@ -5375,6 +5386,10 @@ var SuccessPanel = (function (_super) { ...@@ -5375,6 +5386,10 @@ var SuccessPanel = (function (_super) {
this.hidePanel(); this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.seePrize, {}, function (s, res) { console.log('backToPage'); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.seePrize, {}, function (s, res) { console.log('backToPage'); });
}; };
SuccessPanel.prototype.playAgain = function () {
this.hidePanel();
Main_1.GDispatcher.dispatchEvent("gameReset");
};
return SuccessPanel; return SuccessPanel;
}(Panel_1.Panel)); }(Panel_1.Panel));
exports.SuccessPanel = SuccessPanel; exports.SuccessPanel = SuccessPanel;
...@@ -15030,6 +15045,7 @@ var Star = (function (_super) { ...@@ -15030,6 +15045,7 @@ var Star = (function (_super) {
_this.pinkStar = Ins_1.Ins.initSprite("5c5a81d6-4d33-4332-b4d8-a5947eedfa67"); _this.pinkStar = Ins_1.Ins.initSprite("5c5a81d6-4d33-4332-b4d8-a5947eedfa67");
_this.tipText = Tools_1.Tools.getText("1000分", 20); _this.tipText = Tools_1.Tools.getText("1000分", 20);
_this.lightCircle = new lightCircle_1.LightCircle(); _this.lightCircle = new lightCircle_1.LightCircle();
_this.isBling = false;
_this.addChild(_this.starContainer); _this.addChild(_this.starContainer);
_this.starContainer.addChild(_this.bg); _this.starContainer.addChild(_this.bg);
_this.starContainer.anchorX = _this.bg.width >> 1; _this.starContainer.anchorX = _this.bg.width >> 1;
...@@ -15051,11 +15067,16 @@ var Star = (function (_super) { ...@@ -15051,11 +15067,16 @@ var Star = (function (_super) {
} }
Star.prototype.bling = function () { Star.prototype.bling = function () {
var _this = this; var _this = this;
this.isBling = true;
this.lightCircle.play(); this.lightCircle.play();
FYGE.Tween.get(this.starContainer).to({ scaleX: 0.3, scaleY: 0.3 }, 200).call(function () { FYGE.Tween.get(this.starContainer).to({ scaleX: 0.3, scaleY: 0.3 }, 200).call(function () {
_this.pinkStar.visible = true; _this.pinkStar.visible = true;
}).to({ scaleX: 1.3, scaleY: 1.3 }, 200).to({ scaleX: 1, scaleY: 1 }, 100); }).to({ scaleX: 1.3, scaleY: 1.3 }, 200).to({ scaleX: 1, scaleY: 1 }, 100);
}; };
Star.prototype.dark = function () {
this.isBling = false;
this.pinkStar.visible = false;
};
return Star; return Star;
}(FYGE.Container)); }(FYGE.Container));
exports.Star = Star; exports.Star = Star;
...@@ -15148,6 +15169,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { ...@@ -15148,6 +15169,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.XxlScene = void 0; exports.XxlScene = void 0;
var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts"); var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/views/Scene.ts");
var resCanvasList_1 = __webpack_require__(/*! ../../resCanvasList */ "./resCanvasList.js");
var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts"); var Ins_1 = __webpack_require__(/*! ../Ins */ "./src/Ins.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts"); var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var ObjectPool_1 = __webpack_require__(/*! ./ObjectPool */ "./src/xiaoxiaole/ObjectPool.ts"); var ObjectPool_1 = __webpack_require__(/*! ./ObjectPool */ "./src/xiaoxiaole/ObjectPool.ts");
...@@ -15254,6 +15276,12 @@ var XxlScene = (function (_super) { ...@@ -15254,6 +15276,12 @@ var XxlScene = (function (_super) {
this.addChild(this.bg); this.addChild(this.bg);
this.x = (Ins_1.Ins.stageW - 750) >> 1; this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1; this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 40 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
this.topContainer = new FYGE.Container(); this.topContainer = new FYGE.Container();
this.topContainer.y = 220; this.topContainer.y = 220;
this.addChild(this.topContainer); this.addChild(this.topContainer);
...@@ -15580,9 +15608,18 @@ var XxlScene = (function (_super) { ...@@ -15580,9 +15608,18 @@ var XxlScene = (function (_super) {
this.level = 3; this.level = 3;
this.llevelText.text = "第" + this.level + "关"; this.llevelText.text = "第" + this.level + "关";
this.difficulty = 5; this.difficulty = 5;
if (!this.star1.isBling) {
this.star1.bling();
}
this.star2.bling(); this.star2.bling();
} }
else if (this.userScore >= 3000) { else if (this.userScore >= 3000) {
if (!this.star1.isBling) {
this.star1.bling();
}
if (!this.star2.isBling) {
this.star2.bling();
}
this.star3.bling(); this.star3.bling();
this.gameOver(); this.gameOver();
} }
...@@ -15606,6 +15643,7 @@ var XxlScene = (function (_super) { ...@@ -15606,6 +15643,7 @@ var XxlScene = (function (_super) {
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)]; return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)];
case 1: case 1:
prizeInfo = _a.sent(); prizeInfo = _a.sent();
Main_1.GDispatcher.addEventListener("gameReset", this.reset, this);
if (this.userInfo.win) { if (this.userInfo.win) {
prize = prizeInfo.data; prize = prizeInfo.data;
if (prize.type <= 3) { if (prize.type <= 3) {
...@@ -15915,6 +15953,7 @@ var XxlScene = (function (_super) { ...@@ -15915,6 +15953,7 @@ var XxlScene = (function (_super) {
}; };
XxlScene.prototype.refresh = function () { XxlScene.prototype.refresh = function () {
var _this = this; var _this = this;
this.g.clear();
var circleItems = this.circleItems; var circleItems = this.circleItems;
circleItems.forEach(function (co) { circleItems.forEach(function (co) {
_this.emptyHexIndices.push(co.index); _this.emptyHexIndices.push(co.index);
...@@ -15943,9 +15982,62 @@ var XxlScene = (function (_super) { ...@@ -15943,9 +15982,62 @@ var XxlScene = (function (_super) {
}; };
XxlScene.prototype.gameStart = function () { XxlScene.prototype.gameStart = function () {
this.rightUserContainer.visible = true; this.rightUserContainer.visible = true;
this.timeNum = XxlConfig_1.config.time;
this.lt = 0;
this.tt = 0;
this.isGameStart = true; this.isGameStart = true;
Main_1.GDispatcher.removeEventListener("MatchCompelete", this.gameStart); Main_1.GDispatcher.removeEventListener("MatchCompelete", this.gameStart);
}; };
XxlScene.prototype.reset = function () {
return __awaiter(this, void 0, void 0, function () {
var userInfoRes;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.selectItems.splice(0);
this.refresh();
this.isGameEnd = false;
this.isGameStart = false;
this.userScore = 0;
this.rightUserContainer.visible = false;
this.lscore.text = "0";
this.rscore.text = "0";
this.llevelText.text = "第一关";
this.rlevelText.text = "第一关";
this.rect.x = this.rectX;
this.star1.dark();
this.star2.dark();
this.star3.dark();
this.timeNum = XxlConfig_1.config.time;
this.time.text = this.timeNum + "";
if (XxlConfig_1.config.time >= 100) {
this.time.textWidth = 80;
}
else if (XxlConfig_1.config.time >= 10) {
this.time.textWidth = 65;
}
else {
this.time.textWidth = 50;
}
this.time.x = Ins_1.Ins.stageW / 2 - this.time.textWidth / 2 - 15;
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})];
case 1:
userInfoRes = _a.sent();
this.userInfo = userInfoRes.data;
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
console.log("没有游戏次数");
}
else {
this.robot = new Robot_1.Robot(!this.userInfo.win);
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, this.userInfo);
this.ravatar.texture = FYGE.Sprite.fromUrl(this.userInfo.fakeUserImgUrl).texture;
this.rnickname.text = this.userInfo.fakeUserName;
}
return [2];
}
});
});
};
XxlScene.prototype.updateFrame = function () { XxlScene.prototype.updateFrame = function () {
if (!this.isGameStart) { if (!this.isGameStart) {
return; return;
...@@ -16002,6 +16094,7 @@ var XxlScene = (function (_super) { ...@@ -16002,6 +16094,7 @@ var XxlScene = (function (_super) {
var that = this; var that = this;
that.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, that.mouseDown, that); that.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, that.mouseDown, that);
that.removeEventListener(FYGE.MouseEvent.MOUSE_UP, that.mouseUp, that); that.removeEventListener(FYGE.MouseEvent.MOUSE_UP, that.mouseUp, that);
Main_1.GDispatcher.removeEventListener("gameReset", this.reset);
}; };
return XxlScene; return XxlScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
...@@ -6,8 +6,8 @@ var fs = require("fs"); ...@@ -6,8 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js") // fs.readFileSync("./output.js")
// ) // )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/'; // var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
// var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/" var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/"
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/' // var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
var version = Math.round(new Date().getTime() / 1000); var version = Math.round(new Date().getTime() / 1000);
......
export const config = { export const config = {
//倒计时时间s //倒计时时间s
time: 12, time: 120,
//3关分数 //3关分数
first: 1000, first: 1000,
second: 2000, second: 2000,
third: 3000, third: 3000,
//5种每个球的分数 //5种每个球的分数
score: [1000, 10, 10, 10, 10], score: [10, 10, 10, 10, 10],
//游戏难度3,4,5 //游戏难度3,4,5
difficulty: 3, difficulty: 3,
//球的资源 //球的资源
......
...@@ -1141,6 +1141,8 @@ export class XxlScene extends Scene { ...@@ -1141,6 +1141,8 @@ export class XxlScene extends Scene {
this.rightUserContainer.visible = false this.rightUserContainer.visible = false
this.lscore.text = "0" this.lscore.text = "0"
this.rscore.text = "0" this.rscore.text = "0"
this.llevelText.text = "第一关"
this.rlevelText.text = "第一关"
//进度条归0 //进度条归0
this.rect.x = this.rectX this.rect.x = this.rectX
this.star1.dark() this.star1.dark()
...@@ -1150,6 +1152,7 @@ export class XxlScene extends Scene { ...@@ -1150,6 +1152,7 @@ export class XxlScene extends Scene {
this.timeNum = config.time this.timeNum = config.time
this.time.text = this.timeNum + "" this.time.text = this.timeNum + ""
if (config.time >= 100) { if (config.time >= 100) {
this.time.textWidth = 80 this.time.textWidth = 80
} else if (config.time >= 10) { } else if (config.time >= 10) {
...@@ -1157,6 +1160,7 @@ export class XxlScene extends Scene { ...@@ -1157,6 +1160,7 @@ export class XxlScene extends Scene {
} else { } else {
this.time.textWidth = 50 this.time.textWidth = 50
} }
this.time.x = Ins.stageW / 2 - this.time.textWidth / 2 - 15
const userInfoRes = await sendTbNet(TbNetName.getUserInfo, {}) const userInfoRes = await sendTbNet(TbNetName.getUserInfo, {})
this.userInfo = userInfoRes.data as UserInfo this.userInfo = userInfoRes.data as UserInfo
...@@ -1166,6 +1170,8 @@ export class XxlScene extends Scene { ...@@ -1166,6 +1170,8 @@ export class XxlScene extends Scene {
} else { } else {
this.robot = new Robot(!this.userInfo.win) this.robot = new Robot(!this.userInfo.win)
showPanel(MatchingPanel, this.userInfo) showPanel(MatchingPanel, this.userInfo)
this.ravatar.texture = FYGE.Sprite.fromUrl(this.userInfo.fakeUserImgUrl).texture
this.rnickname.text = this.userInfo.fakeUserName
} }
} }
......
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