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 @@
function injectProps(p) {
engine.injectProp(props, p);
}
//# sourceMappingURL=props.js.map
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
......@@ -24,6 +25,7 @@
inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst;
}
//# sourceMappingURL=utils.js.map
var Element = (function (_super) {
tslib.__extends(Element, _super);
......@@ -139,6 +141,7 @@
};
return Element;
}(engine.Container));
//# sourceMappingURL=Element.js.map
var ElementType;
(function (ElementType) {
......@@ -356,6 +359,7 @@
];
return MapData;
}());
//# sourceMappingURL=MapData.js.map
var GameView = (function (_super) {
tslib.__extends(GameView, _super);
......@@ -375,6 +379,7 @@
_this.ingame = true;
_this.level = 0;
_this.inrecord = false;
_this.requestGameOver = false;
_this._seq = 1;
_this.sptime = Date.now();
_this._score = 0;
......@@ -550,7 +555,8 @@
if (this.ingameover) {
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.anicontainer.removeChild(this.jiantoucont);
engine.globalEvent.dispatchEvent("game-over", {
......@@ -569,6 +575,7 @@
this.gametime = time;
this.level = level;
this.ingameover = false;
this.requestGameOver = false;
this.seq = 1;
this.changeHomeShow(mode);
this.changeEnable(false);
......@@ -602,6 +609,7 @@
};
GameView.prototype.start = function () {
this.gamestat = 1;
this.requestGameOver = false;
this.selectArr = new Array();
this.changeEnable(true);
};
......@@ -1264,17 +1272,19 @@
this.checkGameOver("recordcomp");
};
GameView.prototype.recordGame = function () {
this.inrecord = true;
this.eptime = Date.now();
engine.globalEvent.dispatchEvent('game-record', {
score: this.seqscore,
seq: this.seq,
sptime: this.sptime,
eptime: this.eptime
});
this.seq += 1;
this.seqscore = 0;
this.sptime = Date.now();
if (!this.requestGameOver) {
this.inrecord = true;
this.eptime = Date.now();
engine.globalEvent.dispatchEvent('game-record', {
score: this.seqscore,
seq: this.seq,
sptime: this.sptime,
eptime: this.eptime
});
this.seq += 1;
this.seqscore = 0;
this.sptime = Date.now();
}
};
GameView.prototype.attionEliminate = function () {
var attiondata;
......@@ -1682,6 +1692,7 @@
};
return GameView;
}(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super);
......@@ -1725,6 +1736,7 @@
};
return GameWrapper;
}(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) {
prepareProps();
......@@ -1732,6 +1744,7 @@
var instance = new GameWrapper();
return instance;
}
//# sourceMappingURL=index.js.map
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 {
ingame = true;
level = 0;
inrecord = false;
requestGameOver = false;
set gamestat(stat){//1游戏中,2,游戏外
this._gamestat = stat;
if(stat==2){
......@@ -275,7 +276,8 @@ export default class GameView extends engine.Container {
if(this.ingameover){
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.anicontainer.removeChild(this.jiantoucont);
......@@ -291,6 +293,7 @@ export default class GameView extends engine.Container {
this.gametime = time;
this.level = level;
this.ingameover = false;
this.requestGameOver = false;
this.seq = 1;
this.changeHomeShow(mode);
this.changeEnable(false);
......@@ -322,6 +325,7 @@ export default class GameView extends engine.Container {
}
start(){
this.gamestat = 1;
this.requestGameOver = false;
this.selectArr = new Array();
this.changeEnable(true);
}
......@@ -1050,21 +1054,23 @@ export default class GameView extends engine.Container {
}
//游戏记录
recordGame(){
//操作记录
this.inrecord = true;
this.eptime = Date.now();
engine.globalEvent.dispatchEvent('game-record',
{
score:this.seqscore,
seq:this.seq,
sptime:this.sptime,
eptime:this.eptime
}
);
if(!this.requestGameOver){
//操作记录
this.inrecord = true;
this.eptime = Date.now();
engine.globalEvent.dispatchEvent('game-record',
{
score:this.seqscore,
seq:this.seq,
sptime:this.sptime,
eptime:this.eptime
}
);
this.seq+=1;
this.seqscore = 0;
this.sptime = Date.now();
this.seq+=1;
this.seqscore = 0;
this.sptime = Date.now();
}
}
//相邻检测
......
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