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

add code

parent d45075c8
......@@ -2569,7 +2569,7 @@ var Root = (function (_super) {
}
this.removeChild(this.scoreBoard);
this.scoreBoard = null;
this.goodsContainer.stopGoods();
this.goodsContainer.stopGoods('pause');
Main_1.GDispatcher.addEventListener('MatchCompelete', this.gameStart, this);
this.goodsContainer.createGoodsContainer();
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, this.userInfo);
......@@ -2638,9 +2638,6 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
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('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
this.touchXStart = e.localX;
......@@ -3097,10 +3094,14 @@ var GoodsContainer = (function (_super) {
this.createLineTimeOut = null;
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
this.stopGoods();
};
GoodsContainer.prototype.stopGoods = function () {
GoodsContainer.prototype.stopGoods = function (type) {
if (type === void 0) { type = ''; }
if (type === 'pause') {
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
}
this.intoGoods = [];
this.goodsArr = [];
this.removeChild(this.goodsContainer);
......
This diff is collapsed.
......@@ -2571,7 +2571,7 @@ var Root = (function (_super) {
}
this.removeChild(this.scoreBoard);
this.scoreBoard = null;
this.goodsContainer.stopGoods();
this.goodsContainer.stopGoods('pause');
Main_1.GDispatcher.addEventListener('MatchCompelete', this.gameStart, this);
this.goodsContainer.createGoodsContainer();
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, this.userInfo);
......@@ -2640,9 +2640,6 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
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('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
this.touchXStart = e.localX;
......@@ -3099,10 +3096,14 @@ var GoodsContainer = (function (_super) {
this.createLineTimeOut = null;
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
this.stopGoods();
};
GoodsContainer.prototype.stopGoods = function () {
GoodsContainer.prototype.stopGoods = function (type) {
if (type === void 0) { type = ''; }
if (type === 'pause') {
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
}
this.intoGoods = [];
this.goodsArr = [];
this.removeChild(this.goodsContainer);
......
......@@ -6,8 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// 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 = '/Applications/DUIBA-TAOBAO/YD/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 version = Math.round(new Date().getTime() / 1000);
......
......@@ -128,6 +128,8 @@ export default class Root extends FYGE.Container {
const userInfoRes = await sendTbNet(TbNetName.getUserInfo, {})
this.userInfo = userInfoRes.data
console.log('CSD-GAME this.userInfo:', userInfoRes.data)
// 若返回信息中 显示没有游戏次数
if (this.userInfo.noGameTime && this.userInfo.noGameTime == 1) {
GDispatcher.addEventListener("outCallBackToPage", this.backOutCall, this)
return
......@@ -136,11 +138,8 @@ export default class Root extends FYGE.Container {
this.removeChild(this.scoreBoard)
this.scoreBoard = null
this.goodsContainer.stopGoods()
this.goodsContainer.stopGoods('pause')
// 若返回信息中 显示没有游戏次数
GDispatcher.addEventListener('MatchCompelete', this.gameStart, this)
this.goodsContainer.createGoodsContainer()
showPanel(MatchingPanel, this.userInfo)
......@@ -191,6 +190,9 @@ export default class Root extends FYGE.Container {
}
backOutCall() {
// this.removeChild(this.scoreBoard)
// this.scoreBoard = null
// this.goodsContainer.stopGoods()
GDispatcher.removeEventListener('gameReset', this.gameAgain, this)
GDispatcher.removeEventListener('outCallBackToPage', this.backOutCall, this)
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('back_To_Page') })
......@@ -213,11 +215,6 @@ export default class Root extends FYGE.Container {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this)
}
// 退出游戏 返回主页
backToPage() {
sendTbNet(TbNetName.backToPage, {}, (s, res) => { console.log('back_To_Page') })
}
onMouseDownArea(e) {
if (this.gameStartFlag) { this.touchXStart = e.localX }
}
......
......@@ -177,12 +177,14 @@ export default class GoodsContainer extends FYGE.Container {
this.createLineTimeOut = null
clearInterval(this.createGoodTimeOut)
this.createGoodTimeOut = null
this.stopGoods()
}
stopGoods () {
stopGoods (type = '') {
if (type === 'pause') {
clearInterval(this.createGoodTimeOut)
this.createGoodTimeOut = null
}
this.intoGoods = []
this.goodsArr = []
this.removeChild(this.goodsContainer)
......
......@@ -2560,9 +2560,6 @@ var Root = (function (_super) {
switch (_a.label) {
case 0:
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
this.removeChild(this.scoreBoard);
this.scoreBoard = null;
this.goodsContainer.stopGoods();
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})];
case 1:
userInfoRes = _a.sent();
......@@ -2572,11 +2569,12 @@ var Root = (function (_super) {
Main_1.GDispatcher.addEventListener("outCallBackToPage", this.backOutCall, this);
return [2];
}
else {
this.removeChild(this.scoreBoard);
this.scoreBoard = null;
this.goodsContainer.stopGoods('pause');
Main_1.GDispatcher.addEventListener('MatchCompelete', this.gameStart, this);
this.goodsContainer.createGoodsContainer();
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, this.userInfo);
}
return [2];
}
});
......@@ -2642,9 +2640,6 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
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('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
this.touchXStart = e.localX;
......@@ -3101,10 +3096,14 @@ var GoodsContainer = (function (_super) {
this.createLineTimeOut = null;
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
this.stopGoods();
};
GoodsContainer.prototype.stopGoods = function () {
GoodsContainer.prototype.stopGoods = function (type) {
if (type === void 0) { type = ''; }
if (type === 'pause') {
clearInterval(this.createGoodTimeOut);
this.createGoodTimeOut = null;
}
this.intoGoods = [];
this.goodsArr = [];
this.removeChild(this.goodsContainer);
......
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