Commit 95f8ecd9 authored by zjz1994's avatar zjz1994

代码暂存

parent 7a44cb45
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
function injectProps(p) { function injectProps(p) {
engine.injectProp(props, p); engine.injectProp(props, p);
} }
//# sourceMappingURL=props.js.map
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(getAssetByUUID(uuid).uuid);
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst; return inst;
} }
//# sourceMappingURL=utils.js.map
var Element = (function (_super) { var Element = (function (_super) {
tslib.__extends(Element, _super); tslib.__extends(Element, _super);
...@@ -139,6 +141,7 @@ ...@@ -139,6 +141,7 @@
}; };
return Element; return Element;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Element.js.map
var ElementType; var ElementType;
(function (ElementType) { (function (ElementType) {
...@@ -356,6 +359,7 @@ ...@@ -356,6 +359,7 @@
]; ];
return MapData; return MapData;
}()); }());
//# sourceMappingURL=MapData.js.map
var GameView = (function (_super) { var GameView = (function (_super) {
tslib.__extends(GameView, _super); tslib.__extends(GameView, _super);
...@@ -375,6 +379,7 @@ ...@@ -375,6 +379,7 @@
_this.ingame = true; _this.ingame = true;
_this.level = 0; _this.level = 0;
_this.inrecord = false; _this.inrecord = false;
_this.requestGameOver = false;
_this._seq = 1; _this._seq = 1;
_this.sptime = Date.now(); _this.sptime = Date.now();
_this._score = 0; _this._score = 0;
...@@ -550,7 +555,8 @@ ...@@ -550,7 +555,8 @@
if (this.ingameover) { if (this.ingameover) {
console.log("倒计时已结束2==========", this.inEliminate, this.inrecord, type); console.log("倒计时已结束2==========", this.inEliminate, this.inrecord, type);
} }
if (this.ingameover && !this.inEliminate && !this.inrecord) { if (this.ingameover && !this.inEliminate && !this.inrecord && !this.requestGameOver) {
this.requestGameOver = true;
this.unShowEleAttion(); this.unShowEleAttion();
this.anicontainer.removeChild(this.jiantoucont); this.anicontainer.removeChild(this.jiantoucont);
engine.globalEvent.dispatchEvent("game-over", { engine.globalEvent.dispatchEvent("game-over", {
...@@ -569,6 +575,7 @@ ...@@ -569,6 +575,7 @@
this.gametime = time; this.gametime = time;
this.level = level; this.level = level;
this.ingameover = false; this.ingameover = false;
this.requestGameOver = false;
this.seq = 1; this.seq = 1;
this.changeHomeShow(mode); this.changeHomeShow(mode);
this.changeEnable(false); this.changeEnable(false);
...@@ -602,6 +609,7 @@ ...@@ -602,6 +609,7 @@
}; };
GameView.prototype.start = function () { GameView.prototype.start = function () {
this.gamestat = 1; this.gamestat = 1;
this.requestGameOver = false;
this.selectArr = new Array(); this.selectArr = new Array();
this.changeEnable(true); this.changeEnable(true);
}; };
...@@ -1264,6 +1272,7 @@ ...@@ -1264,6 +1272,7 @@
this.checkGameOver("recordcomp"); this.checkGameOver("recordcomp");
}; };
GameView.prototype.recordGame = function () { GameView.prototype.recordGame = function () {
if (!this.requestGameOver) {
this.inrecord = true; this.inrecord = true;
this.eptime = Date.now(); this.eptime = Date.now();
engine.globalEvent.dispatchEvent('game-record', { engine.globalEvent.dispatchEvent('game-record', {
...@@ -1275,6 +1284,7 @@ ...@@ -1275,6 +1284,7 @@
this.seq += 1; this.seq += 1;
this.seqscore = 0; this.seqscore = 0;
this.sptime = Date.now(); this.sptime = Date.now();
}
}; };
GameView.prototype.attionEliminate = function () { GameView.prototype.attionEliminate = function () {
var attiondata; var attiondata;
...@@ -1682,6 +1692,7 @@ ...@@ -1682,6 +1692,7 @@
}; };
return GameView; return GameView;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) { var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super); tslib.__extends(GameWrapper, _super);
...@@ -1725,6 +1736,7 @@ ...@@ -1725,6 +1736,7 @@
}; };
return GameWrapper; return GameWrapper;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) { function index (props) {
prepareProps(); prepareProps();
...@@ -1732,6 +1744,7 @@ ...@@ -1732,6 +1744,7 @@
var instance = new GameWrapper(); var instance = new GameWrapper();
return instance; return instance;
} }
//# sourceMappingURL=index.js.map
return index; return index;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -72,6 +72,7 @@ export default class GameView extends engine.Container { ...@@ -72,6 +72,7 @@ export default class GameView extends engine.Container {
ingame = true; ingame = true;
level = 0; level = 0;
inrecord = false; inrecord = false;
requestGameOver = false;
set gamestat(stat){//1游戏中,2,游戏外 set gamestat(stat){//1游戏中,2,游戏外
this._gamestat = stat; this._gamestat = stat;
if(stat==2){ if(stat==2){
...@@ -275,7 +276,8 @@ export default class GameView extends engine.Container { ...@@ -275,7 +276,8 @@ export default class GameView extends engine.Container {
if(this.ingameover){ if(this.ingameover){
console.log("倒计时已结束2==========",this.inEliminate,this.inrecord,type); console.log("倒计时已结束2==========",this.inEliminate,this.inrecord,type);
} }
if(this.ingameover&&!this.inEliminate&&!this.inrecord){ if(this.ingameover&&!this.inEliminate&&!this.inrecord&&!this.requestGameOver){
this.requestGameOver = true;
this.unShowEleAttion(); this.unShowEleAttion();
this.anicontainer.removeChild(this.jiantoucont); this.anicontainer.removeChild(this.jiantoucont);
...@@ -291,6 +293,7 @@ export default class GameView extends engine.Container { ...@@ -291,6 +293,7 @@ export default class GameView extends engine.Container {
this.gametime = time; this.gametime = time;
this.level = level; this.level = level;
this.ingameover = false; this.ingameover = false;
this.requestGameOver = false;
this.seq = 1; this.seq = 1;
this.changeHomeShow(mode); this.changeHomeShow(mode);
this.changeEnable(false); this.changeEnable(false);
...@@ -322,6 +325,7 @@ export default class GameView extends engine.Container { ...@@ -322,6 +325,7 @@ export default class GameView extends engine.Container {
} }
start(){ start(){
this.gamestat = 1; this.gamestat = 1;
this.requestGameOver = false;
this.selectArr = new Array(); this.selectArr = new Array();
this.changeEnable(true); this.changeEnable(true);
} }
...@@ -1050,6 +1054,7 @@ export default class GameView extends engine.Container { ...@@ -1050,6 +1054,7 @@ export default class GameView extends engine.Container {
} }
//游戏记录 //游戏记录
recordGame(){ recordGame(){
if(!this.requestGameOver){
//操作记录 //操作记录
this.inrecord = true; this.inrecord = true;
this.eptime = Date.now(); this.eptime = Date.now();
...@@ -1066,6 +1071,7 @@ export default class GameView extends engine.Container { ...@@ -1066,6 +1071,7 @@ export default class GameView extends engine.Container {
this.seqscore = 0; this.seqscore = 0;
this.sptime = Date.now(); this.sptime = Date.now();
} }
}
//相邻检测 //相邻检测
attionEliminate(){ attionEliminate(){
......
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