Commit 1987981c authored by spc's avatar spc

modified: src/Main.ts

parent c5f6827b
...@@ -1925,7 +1925,7 @@ var Main = (function () { ...@@ -1925,7 +1925,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)]; return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2: case 2:
_a.sent(); _a.sent();
ctrls_1.changeScene(XxlScene_1.XxlScene); ctrls_1.changeScene(MainScene_2.OpenAni);
return [2]; return [2];
} }
}); });
......
This diff is collapsed.
...@@ -1927,7 +1927,7 @@ var Main = (function () { ...@@ -1927,7 +1927,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)]; return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2: case 2:
_a.sent(); _a.sent();
ctrls_1.changeScene(XxlScene_1.XxlScene); ctrls_1.changeScene(MainScene_2.OpenAni);
return [2]; return [2];
} }
}); });
......
...@@ -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_taobao/taobao_mini/client/pages/pagecanvas" var endPath = "C:/Users/Duiba/Desktop/work/雅顿/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);
......
...@@ -157,9 +157,9 @@ export class Main { ...@@ -157,9 +157,9 @@ export class Main {
await this.loadImageTexturesCsd01(resCanvasList) await this.loadImageTexturesCsd01(resCanvasList)
await this.loadImageTexturesCsd02(resCanvasList) await this.loadImageTexturesCsd02(resCanvasList)
// changeScene(OpenAni) changeScene(OpenAni)
// changeScene(CsdScene) // changeScene(CsdScene)
changeScene(XxlScene) // changeScene(XxlScene)
}) })
await InitLottie.initLottieList(resLottieList); await InitLottie.initLottieList(resLottieList);
......
...@@ -682,6 +682,7 @@ export class XxlScene extends Scene { ...@@ -682,6 +682,7 @@ export class XxlScene extends Scene {
async gameOver() { async gameOver() {
if (!this.isGameEnd) { if (!this.isGameEnd) {
this.isGameEnd = true this.isGameEnd = true
this.updateFakeScore(this.robot.getScore(this.userScore, this.timeNum))
const prizeInfo = await sendTbNet(TbNetName.getPrizeInfo) const prizeInfo = await sendTbNet(TbNetName.getPrizeInfo)
if (this.userInfo.win) { if (this.userInfo.win) {
//胜利 //胜利
...@@ -707,6 +708,10 @@ export class XxlScene extends Scene { ...@@ -707,6 +708,10 @@ export class XxlScene extends Scene {
} }
updateFakeScore(userGetScore: number) { updateFakeScore(userGetScore: number) {
if (this.isGameEnd || !this.isGameStart) {
//游戏未开始或者游戏已结束
return
}
if (this.robotScore == userGetScore) { if (this.robotScore == userGetScore) {
return return
} }
...@@ -1104,7 +1109,6 @@ export class XxlScene extends Scene { ...@@ -1104,7 +1109,6 @@ export class XxlScene extends Scene {
return return
} }
if (this.isGameEnd) { if (this.isGameEnd) {
this.updateFakeScore(this.robot.getScore(this.userScore, this.timeNum))
this.gameOver() this.gameOver()
// console.log("游戏结束") // console.log("游戏结束")
return return
......
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