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 () {
|
editor.prototype.updateMap = function () {
|
||||||
var blocks = main.editor.mapIntoBlocks(editor.map.map(function (v) {
|
var blocks = main.editor.mapIntoBlocks(editor.map.map(function (v) {
|
||||||
return v.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='bg' width='416' height='416'></canvas>
|
||||||
<canvas class='gameCanvas' id='event' 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='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>
|
<canvas class='egameCanvas' id='eui' width='416' height='416' style='z-index:100'></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
|
|||||||
@ -189,7 +189,10 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
|||||||
formData.append('seed', core.getFlag('seed'));
|
formData.append('seed', core.getFlag('seed'));
|
||||||
formData.append('route', core.encodeRoute(core.status.route));
|
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() {
|
setTimeout(function() {
|
||||||
confirmDownload();
|
confirmDownload();
|
||||||
@ -197,9 +200,17 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
core.ui.drawConfirmBox("你想记录你的ID和成绩吗?", function () {
|
core.ui.drawConfirmBox("你想记录你的ID和成绩吗?", function () {
|
||||||
doUpload(prompt("请输入你的ID:"));
|
if (main.isCompetition) {
|
||||||
|
doUpload("");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
doUpload(prompt("请输入你的ID:"));
|
||||||
|
}
|
||||||
}, function () {
|
}, function () {
|
||||||
doUpload(undefined);
|
if (main.isCompetition)
|
||||||
|
confirmDownload();
|
||||||
|
else
|
||||||
|
doUpload(undefined);
|
||||||
})
|
})
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
2
main.js
2
main.js
@ -12,6 +12,8 @@ function main() {
|
|||||||
this.bgmRemote = false; // 是否采用远程BGM
|
this.bgmRemote = false; // 是否采用远程BGM
|
||||||
this.bgmRemoteRoot = "https://gitee.com/ckcz123/h5music/raw/master/"; // 远程BGM的根目录
|
this.bgmRemoteRoot = "https://gitee.com/ckcz123/h5music/raw/master/"; // 远程BGM的根目录
|
||||||
|
|
||||||
|
this.isCompetition = false; // 是否是比赛模式
|
||||||
|
|
||||||
//------------------------ 用户修改内容 END ------------------------//
|
//------------------------ 用户修改内容 END ------------------------//
|
||||||
|
|
||||||
this.dom = {
|
this.dom = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user