Commit c7f39477 authored by AU-Pro-mac's avatar AU-Pro-mac

add new code

parent 51378a10
......@@ -2554,6 +2554,7 @@ var Root = (function (_super) {
Root.prototype.gameAgain = function () {
return __awaiter(this, void 0, void 0, function () {
var userInfoRes;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
......@@ -2566,7 +2567,8 @@ var Root = (function (_super) {
userInfoRes = _a.sent();
this.userInfo = userInfoRes.data;
console.log('CSD-GAME this.userInfo:', userInfoRes.data);
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
if (this.userInfo.noGameTime && this.userInfo.noGameTime == 1) {
Main_1.GDispatcher.addEventListener("outCallBackToPage", function () { _this.gameOver('back'); }, this);
return [2];
}
else {
......@@ -2594,7 +2596,8 @@ var Root = (function (_super) {
this.goodsContainer.removeAllGoods();
this.scoreBoard.stopTime();
if (type === 'back') {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('back_To_Page'); });
return [2];
}
if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2];
......@@ -2634,7 +2637,7 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
};
Root.prototype.backToPage = function () {
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('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
......@@ -2682,7 +2685,7 @@ var Root = (function (_super) {
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
this.backBtn.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () { _this.gameOver('back'); }, this);
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
Main_1.GDispatcher.removeEventListener("outCallBackToPage", function () { _this.gameOver('back'); });
};
return Root;
}(FYGE.Container));
......@@ -15112,7 +15115,7 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
exports.config = {
time: 120,
time: 30,
first: 1000,
second: 2000,
third: 3000,
......
This diff is collapsed.
......@@ -2556,6 +2556,7 @@ var Root = (function (_super) {
Root.prototype.gameAgain = function () {
return __awaiter(this, void 0, void 0, function () {
var userInfoRes;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
......@@ -2568,7 +2569,8 @@ var Root = (function (_super) {
userInfoRes = _a.sent();
this.userInfo = userInfoRes.data;
console.log('CSD-GAME this.userInfo:', userInfoRes.data);
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
if (this.userInfo.noGameTime && this.userInfo.noGameTime == 1) {
Main_1.GDispatcher.addEventListener("outCallBackToPage", function () { _this.gameOver('back'); }, this);
return [2];
}
else {
......@@ -2596,7 +2598,8 @@ var Root = (function (_super) {
this.goodsContainer.removeAllGoods();
this.scoreBoard.stopTime();
if (type === 'back') {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('back_To_Page'); });
return [2];
}
if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2];
......@@ -2636,7 +2639,7 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
};
Root.prototype.backToPage = function () {
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('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
......@@ -2684,7 +2687,7 @@ var Root = (function (_super) {
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
this.backBtn.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () { _this.gameOver('back'); }, this);
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
Main_1.GDispatcher.removeEventListener("outCallBackToPage", function () { _this.gameOver('back'); });
};
return Root;
}(FYGE.Container));
......@@ -15114,7 +15117,7 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
exports.config = {
time: 120,
time: 30,
first: 1000,
second: 2000,
third: 3000,
......
......@@ -77,7 +77,6 @@ export default class Root extends FYGE.Container {
this.goodsContainer = new GoodsContainer(this)
this.addChild(this.goodsContainer)
// --  返回
this.backBtn = Tools.getSprite(resCanvasList['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2)
this.backBtn.mouseEnable = true
......@@ -136,7 +135,8 @@ export default class Root extends FYGE.Container {
console.log('CSD-GAME this.userInfo:', userInfoRes.data)
// 若返回信息中 显示没有游戏次数
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
if (this.userInfo.noGameTime && this.userInfo.noGameTime == 1) {
GDispatcher.addEventListener("outCallBackToPage", () => { this.gameOver('back') }, this)
return
// 否则 执行正常开始逻辑
} else {
......@@ -160,7 +160,8 @@ export default class Root extends FYGE.Container {
// 游戏中途返回
if (type === 'back') {
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('backToPage') })
GDispatcher.removeEventListener('gameReset', this.gameAgain, this)
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('back_To_Page') })
return
}
......@@ -208,7 +209,7 @@ export default class Root extends FYGE.Container {
// 退出游戏 返回主页
backToPage () {
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('backToPage') })
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('back_To_Page') })
}
onMouseDownArea (e) {
......@@ -255,8 +256,8 @@ export default class Root extends FYGE.Container {
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this)
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this)
this.backBtn.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, () => { this.gameOver('back') }, this)
GDispatcher.removeEventListener("outCallBackToPage", () => { this.gameOver('back') })
// 取消监听再来一局
GDispatcher.removeEventListener('gameReset', this.gameAgain, this)
// throw new Error("Method not implemented.")
}
}
export const config = {
//倒计时时间s
time: 120,
time: 30,
//3关分数
first: 1000,
second: 2000,
......
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