Fix gameover & new map
This commit is contained in:
parent
759cae30f8
commit
81ccf6a08f
@ -435,6 +435,10 @@ editor_mode = function (editor) {
|
|||||||
var newFileName = document.getElementById('newFileName');
|
var newFileName = document.getElementById('newFileName');
|
||||||
newMap.onclick = function () {
|
newMap.onclick = function () {
|
||||||
if (!newFileName.value) return;
|
if (!newFileName.value) return;
|
||||||
|
if (core.floorIds.indexOf(newFileName.value)>=0) {
|
||||||
|
printe("该楼层已存在!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
editor_mode.onmode('');
|
editor_mode.onmode('');
|
||||||
editor.file.saveNewFile(newFileName.value, function (err) {
|
editor.file.saveNewFile(newFileName.value, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@ -132,24 +132,25 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
|||||||
core.animateFrame.weather.level = 0;
|
core.animateFrame.weather.level = 0;
|
||||||
core.animateFrame.weather.nodes = [];
|
core.animateFrame.weather.nodes = [];
|
||||||
core.setFg(null, 0);
|
core.setFg(null, 0);
|
||||||
|
core.ui.closePanel();
|
||||||
|
|
||||||
// 下载录像
|
// 下载录像
|
||||||
var confirmDownload = function () {
|
var confirmDownload = function () {
|
||||||
|
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
setTimeout(function () {
|
core.ui.drawConfirmBox("你想下载录像吗?", function () {
|
||||||
core.ui.drawConfirmBox("你想下载录像吗?", function () {
|
var obj = {
|
||||||
var obj = {
|
'name': core.firstData.name,
|
||||||
'name': core.firstData.name,
|
'version': core.firstData.version,
|
||||||
'version': core.firstData.version,
|
'hard': core.status.hard,
|
||||||
'hard': core.status.hard,
|
'route': core.encodeRoute(core.status.route)
|
||||||
'route': core.encodeRoute(core.status.route)
|
}
|
||||||
}
|
core.download(core.firstData.name+"_"+core.formatDate2(new Date())+".h5route", JSON.stringify(obj));
|
||||||
core.download(core.firstData.name+"_"+core.formatDate2(new Date())+".h5route", JSON.stringify(obj));
|
core.restart();
|
||||||
core.restart();
|
}, function () {
|
||||||
}, function () {
|
core.restart();
|
||||||
core.restart();
|
})
|
||||||
})
|
|
||||||
}, 150);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传成绩
|
// 上传成绩
|
||||||
@ -185,7 +186,10 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
|||||||
formData.append('route', core.encodeRoute(core.status.route));
|
formData.append('route', core.encodeRoute(core.status.route));
|
||||||
|
|
||||||
core.http("POST", "/games/upload.php", formData);
|
core.http("POST", "/games/upload.php", formData);
|
||||||
confirmDownload();
|
|
||||||
|
setTimeout(function() {
|
||||||
|
confirmDownload();
|
||||||
|
}, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
core.ui.drawConfirmBox("你想记录你的ID和成绩吗?", function () {
|
core.ui.drawConfirmBox("你想记录你的ID和成绩吗?", function () {
|
||||||
@ -203,7 +207,6 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// confirmDownload();
|
|
||||||
confirmUpload();
|
confirmUpload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user