Commit 7a44cb45 authored by zjz1994's avatar zjz1994

代码暂存

parent 985450b4
This diff is collapsed.
...@@ -209,11 +209,21 @@ ...@@ -209,11 +209,21 @@
case 3: case 3:
l++; l++;
return [3, 1]; return [3, 1];
case 4: return [2]; case 4:
this.removeSelectImg();
return [2];
} }
}); });
}); });
}; };
GameView.prototype.removeSelectImg = function () {
if (this.selectimg3) {
this.blockcont.removeChild(this.selectimg3);
}
if (this.selectimg4) {
this.blockcont.removeChild(this.selectimg4);
}
};
GameView.prototype.startfirst = function () { GameView.prototype.startfirst = function () {
return tslib.__awaiter(this, void 0, void 0, function () { return tslib.__awaiter(this, void 0, void 0, function () {
var actidx, tex, type1, result, res, picarr, mwid, mhei, picnames, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl; var actidx, tex, type1, result, res, picarr, mwid, mhei, picnames, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl;
...@@ -223,6 +233,7 @@ ...@@ -223,6 +233,7 @@
this.dicont.removeChildren(); this.dicont.removeChildren();
this.movesteps = 0; this.movesteps = 0;
this.startime = Date.now(); this.startime = Date.now();
this.removeSelectImg();
actidx = 0; actidx = 0;
this.gametime = this.gameTimes[actidx]; this.gametime = this.gameTimes[actidx];
this.showtime = this.gameTimes[actidx]; this.showtime = this.gameTimes[actidx];
...@@ -313,6 +324,7 @@ ...@@ -313,6 +324,7 @@
this.dicont.removeChildren(); this.dicont.removeChildren();
this.movesteps = 0; this.movesteps = 0;
this.startime = Date.now(); this.startime = Date.now();
this.removeSelectImg();
actidx = props.actidx; actidx = props.actidx;
this.gametime = this.gameTimes[actidx]; this.gametime = this.gameTimes[actidx];
this.showtime = this.gameTimes[actidx]; this.showtime = this.gameTimes[actidx];
...@@ -540,6 +552,7 @@ ...@@ -540,6 +552,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);
......
This diff is collapsed.
...@@ -86,11 +86,22 @@ export default class GameView extends engine.Container { ...@@ -86,11 +86,22 @@ export default class GameView extends engine.Container {
} }
} }
this.removeSelectImg();
}
removeSelectImg(){
if(this.selectimg3){
this.blockcont.removeChild(this.selectimg3);
}
if(this.selectimg4){
this.blockcont.removeChild(this.selectimg4);
}
} }
async startfirst(){ async startfirst(){
this.dicont.removeChildren(); this.dicont.removeChildren();
this.movesteps = 0; this.movesteps = 0;
this.startime = Date.now(); this.startime = Date.now();
this.removeSelectImg();
let actidx = 0; let actidx = 0;
this.gametime = this.gameTimes[actidx]; this.gametime = this.gameTimes[actidx];
...@@ -182,6 +193,7 @@ export default class GameView extends engine.Container { ...@@ -182,6 +193,7 @@ export default class GameView extends engine.Container {
this.dicont.removeChildren(); this.dicont.removeChildren();
this.movesteps = 0; this.movesteps = 0;
this.startime = Date.now(); this.startime = Date.now();
this.removeSelectImg();
let actidx = props.actidx; let actidx = props.actidx;
this.gametime = this.gameTimes[actidx]; this.gametime = this.gameTimes[actidx];
......
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