competition mode
This commit is contained in:
parent
4ecac00f6d
commit
b04b45070f
@ -193,6 +193,8 @@ editor.prototype.drawMapBg = function (img) {
|
||||
}
|
||||
}
|
||||
|
||||
editor.prototype
|
||||
|
||||
editor.prototype.updateMap = function () {
|
||||
var blocks = main.editor.mapIntoBlocks(editor.map.map(function (v) {
|
||||
return v.map(function (v) {
|
||||
|
||||
@ -203,6 +203,7 @@
|
||||
<canvas class='gameCanvas' id='bg' width='416' height='416'></canvas>
|
||||
<canvas class='gameCanvas' id='event' width='416' height='416'></canvas>
|
||||
<canvas class='gameCanvas' id='event2' width='416' height='416'></canvas>
|
||||
<canvas class='gameCanvas' id='efg' width='416' height='416'></canvas>
|
||||
<canvas class='egameCanvas' id='eui' width='416' height='416' style='z-index:100'></canvas>
|
||||
</div>
|
||||
<div class="tools">
|
||||
|
||||
@ -189,7 +189,10 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
||||
formData.append('seed', core.getFlag('seed'));
|
||||
formData.append('route', core.encodeRoute(core.status.route));
|
||||
|
||||
core.http("POST", "/games/upload.php", formData);
|
||||
if (main.isCompetition)
|
||||
core.http("POST", "/games/competition/upload.php", formData);
|
||||
else
|
||||
core.http("POST", "/games/upload.php", formData);
|
||||
|
||||
setTimeout(function() {
|
||||
confirmDownload();
|
||||
@ -197,9 +200,17 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
||||
}
|
||||
|
||||
core.ui.drawConfirmBox("你想记录你的ID和成绩吗?", function () {
|
||||
doUpload(prompt("请输入你的ID:"));
|
||||
if (main.isCompetition) {
|
||||
doUpload("");
|
||||
}
|
||||
else {
|
||||
doUpload(prompt("请输入你的ID:"));
|
||||
}
|
||||
}, function () {
|
||||
doUpload(undefined);
|
||||
if (main.isCompetition)
|
||||
confirmDownload();
|
||||
else
|
||||
doUpload(undefined);
|
||||
})
|
||||
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user