mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-06-09 00:38:00 +08:00
Deploying to gh-pages from @ 0d59b0a5a9
🚀
This commit is contained in:
parent
9b6781c436
commit
553b1355cd
1
assets/antdv-legacy.abd1ebe5.js
Normal file
1
assets/antdv-legacy.abd1ebe5.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/index-legacy.3053b535.js
Normal file
1
assets/index-legacy.3053b535.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/index.f98f7685.js
Normal file
1
assets/index.f98f7685.js
Normal file
File diff suppressed because one or more lines are too long
24
index.html
24
index.html
@ -18,10 +18,10 @@
|
|||||||
<meta name="x5-fullscreen" content="true">
|
<meta name="x5-fullscreen" content="true">
|
||||||
<meta name="x5-page-mode" content="app">
|
<meta name="x5-page-mode" content="app">
|
||||||
<link id="mota-css" type='text/css' href='/HumanBreak/styles.css' rel='stylesheet'>
|
<link id="mota-css" type='text/css' href='/HumanBreak/styles.css' rel='stylesheet'>
|
||||||
<script type="module" crossorigin src="/HumanBreak/assets/index.7c30f9c5.js"></script>
|
<script type="module" crossorigin src="/HumanBreak/assets/index.f98f7685.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/antdv.d3c1a017.js">
|
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/antdv.cc8fc377.js">
|
||||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/common.86a430ec.js">
|
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/common.68d1d5b7.js">
|
||||||
<link rel="stylesheet" href="/HumanBreak/assets/index.3df2849d.css">
|
<link rel="stylesheet" href="/HumanBreak/assets/index.dd9813c9.css">
|
||||||
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
||||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||||
</head>
|
</head>
|
||||||
@ -39,10 +39,13 @@
|
|||||||
startImageLogo.onload = function () {
|
startImageLogo.onload = function () {
|
||||||
startImageBackgroundDiv.style.display = 'block';
|
startImageBackgroundDiv.style.display = 'block';
|
||||||
var onAnimationEnd = function () {
|
var onAnimationEnd = function () {
|
||||||
|
if (window.core && core.plugin && core.plugin.startAnimationEnded) {
|
||||||
|
core.plugin.startAnimationEnded.value = true;
|
||||||
startImageBackgroundDiv.style.display = 'none';
|
startImageBackgroundDiv.style.display = 'none';
|
||||||
startImageLogo.classList.remove("startImageAnimation");
|
startImageLogo.classList.remove("startImageAnimation");
|
||||||
startImageDiv.classList.remove("startImageDivAnimation");
|
startImageDiv.classList.remove("startImageDivAnimation");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
startImageDiv.addEventListener("webkitAnimationEnd", onAnimationEnd);
|
startImageDiv.addEventListener("webkitAnimationEnd", onAnimationEnd);
|
||||||
startImageDiv.addEventListener("animationend", onAnimationEnd);
|
startImageDiv.addEventListener("animationend", onAnimationEnd);
|
||||||
startImageLogo.classList.add("startImageAnimation");
|
startImageLogo.classList.add("startImageAnimation");
|
||||||
@ -58,7 +61,6 @@
|
|||||||
<!-- injection -->
|
<!-- injection -->
|
||||||
<div id='gameGroup'>
|
<div id='gameGroup'>
|
||||||
<p id='mainTips'>请稍候...</p>
|
<p id='mainTips'>请稍候...</p>
|
||||||
<img id='musicBtn'>
|
|
||||||
<div id='startPanel'>
|
<div id='startPanel'>
|
||||||
<div id='startTop'>
|
<div id='startTop'>
|
||||||
<div id='startTopProgressBar'>
|
<div id='startTopProgressBar'>
|
||||||
@ -67,16 +69,6 @@
|
|||||||
<p id='startTopLoadTips'>资源即将开始加载</p>
|
<p id='startTopLoadTips'>资源即将开始加载</p>
|
||||||
<p id='startTopHint'>HTML5魔塔游戏平台,享受更多魔塔游戏:<br />https://h5mota.com/</p>
|
<p id='startTopHint'>HTML5魔塔游戏平台,享受更多魔塔游戏:<br />https://h5mota.com/</p>
|
||||||
</div>
|
</div>
|
||||||
<img id='startBackground'>
|
|
||||||
<p id='startLogo'></p>
|
|
||||||
<div id='startButtonGroup'>
|
|
||||||
<div id='startButtons'>
|
|
||||||
<span class='startButton' id='playGame'>开始游戏</span>
|
|
||||||
<span class='startButton' id='loadGame'>载入游戏</span>
|
|
||||||
<span class='startButton' id='replayGame'>录像回放</span>
|
|
||||||
</div>
|
|
||||||
<div id='levelChooseButtons'></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id='floorMsgGroup'>
|
<div id='floorMsgGroup'>
|
||||||
<p id='logoLabel'></p>
|
<p id='logoLabel'></p>
|
||||||
@ -215,7 +207,7 @@
|
|||||||
|
|
||||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/HumanBreak/assets/polyfills-legacy.fcbd97b9.js"></script>
|
<script nomodule crossorigin id="vite-legacy-polyfill" src="/HumanBreak/assets/polyfills-legacy.fcbd97b9.js"></script>
|
||||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.0ee95fd2.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.3053b535.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1695,7 +1695,7 @@ actions.prototype._clickSL = function (x, y) {
|
|||||||
if (core.events.recoverEvents(core.status.event.interval)) return;
|
if (core.events.recoverEvents(core.status.event.interval)) return;
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
delete core.status.tempRoute;
|
delete core.status.tempRoute;
|
||||||
if (!core.isPlaying()) core.showStartAnimate(true);
|
if (!core.isPlaying()) document.getElementById('start').style.top = '0';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -502,18 +502,11 @@ control.prototype.showStartAnimate = function (noAnimate, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._showStartAnimate_resetDom = function () {
|
control.prototype._showStartAnimate_resetDom = function () {
|
||||||
core.dom.startPanel.style.opacity = 1;
|
core.plugin.loaded.value = true;
|
||||||
core.dom.startPanel.style.display = 'block';
|
|
||||||
core.dom.startTop.style.opacity = 1;
|
|
||||||
core.dom.startTop.style.display = 'block';
|
|
||||||
core.dom.startButtonGroup.style.display = 'none';
|
|
||||||
core.dom.startButtons.style.display = 'block';
|
|
||||||
core.dom.levelChooseButtons.style.display = 'none';
|
|
||||||
core.status.played = false;
|
core.status.played = false;
|
||||||
|
core.dom.gameGroup.style.display = 'none';
|
||||||
core.clearStatus();
|
core.clearStatus();
|
||||||
core.clearMap('all');
|
core.clearMap('all');
|
||||||
core.dom.musicBtn.style.display = 'block';
|
|
||||||
core.setMusicBtn();
|
|
||||||
// 重置音量
|
// 重置音量
|
||||||
core.events.setVolume(1, 0);
|
core.events.setVolume(1, 0);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
@ -521,9 +514,7 @@ control.prototype._showStartAnimate_resetDom = function () {
|
|||||||
|
|
||||||
control.prototype._showStartAnimate_finished = function (start, callback) {
|
control.prototype._showStartAnimate_finished = function (start, callback) {
|
||||||
core.dom.startTop.style.display = 'none';
|
core.dom.startTop.style.display = 'none';
|
||||||
core.dom.startButtonGroup.style.display = 'block';
|
|
||||||
main.selectedButton = null;
|
main.selectedButton = null;
|
||||||
main.selectButton(0);
|
|
||||||
if (start) core.startGame();
|
if (start) core.startGame();
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
};
|
};
|
||||||
@ -2561,6 +2552,10 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
core.saves.autosave.now,
|
core.saves.autosave.now,
|
||||||
1
|
1
|
||||||
)[0];
|
)[0];
|
||||||
|
if (!main.replayChecking) {
|
||||||
|
core.plugin.startOpened.value = false;
|
||||||
|
core.plugin.loaded.value = false;
|
||||||
|
}
|
||||||
if (core.isPlaying() && !core.status.gameOver) {
|
if (core.isPlaying() && !core.status.gameOver) {
|
||||||
core.control.autosave(0);
|
core.control.autosave(0);
|
||||||
core.saves.autosave.now -= 1;
|
core.saves.autosave.now -= 1;
|
||||||
@ -2575,6 +2570,10 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
id == 'autoSave' ? id : 'save' + id,
|
id == 'autoSave' ? id : 'save' + id,
|
||||||
null,
|
null,
|
||||||
function (data) {
|
function (data) {
|
||||||
|
if (!main.replayChecking) {
|
||||||
|
core.plugin.startOpened.value = false;
|
||||||
|
core.plugin.loaded.value = false;
|
||||||
|
}
|
||||||
if (id == 'autoSave' && data != null) {
|
if (id == 'autoSave' && data != null) {
|
||||||
core.saves.autosave.data = data;
|
core.saves.autosave.data = data;
|
||||||
if (!(core.saves.autosave.data instanceof Array)) {
|
if (!(core.saves.autosave.data instanceof Array)) {
|
||||||
@ -3696,14 +3695,7 @@ control.prototype.resumeBgm = function (resumeTime) {
|
|||||||
this.setMusicBtn();
|
this.setMusicBtn();
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype.setMusicBtn = function () {
|
control.prototype.setMusicBtn = function () {};
|
||||||
if (core.musicStatus.bgmStatus)
|
|
||||||
core.dom.musicBtn.src =
|
|
||||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABWVBMVEX///9iYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmL///8AAAC5ubn+/v6xsbEtLS0MDAxmZmZoaGhvb2/c3Nzd3d38/Pz9/f0oKCgpKSl0dHR1dXW6urrb29v7+/v09PTv7+/39/cgICACAgImJibh4eGFhYWGhoaHh4eOjo5paWm7u7vDw8PMzMwyMjI7OztAQEDe3t5FRUVMTEzj4+Pl5eXm5ubp6enr6+tcXFzi4uL19fVeXl74+PgjIyNkZGQGBgaSkpKYmJiampqenp4DAwMwMDBnZ2cICAivr68eHh63t7cLCwsSEhLw8PBhYWEUFBQVFRXNzc3Pz8/Z2dna2toaGhqkpKSlpaWpqamrq6tFOUNAAAAAc3RSTlMAAwQFBhUWGxwkJSYyO0dISVBRUmpvj5CSk5SVoaOlpqiysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKyA0IuUgAAAVdJREFUeF5NkVVbw0AQRTcQrLR4IIEGcidJoaUuQHF3d3d3+P/CkuxCzss8nG++mbnDBJXhNt2CpbeFK1kQpSEKidlc8S9qdATRa6UIdQMoxEpDA0Ov3wUAPfW+qLWACydNv9zMrzkJwPK6FB3oHyOfXfuNxvoBQ+GmBYinhHB77TmiVBxoYUw1AYcEq332AS8OYKosAuTT0nza9uU2USYPRJgGxEiSOFywJ3mNARozgBJJzkfLvfu8JgGDWcC9FEsjWzR+y80gYDEAA8QZ3N6kmP1Fs3fEASB7pob7Hh+Wz5L0ci17Or05J7bH6B6dZv05XWK3rG+myV05Ert592Qo55sPuoIr7hEZHHtieIPWy0RU9DLwc3Mnck/vi8/E8XNrDWQtEVnL/ySKMrv0jPwPp870fprcyYifmiEmqGpHkI5q9ofSFIUk2qiwIGpEMyxYhhZRRcMPz89RJ2s9W8wAAAAASUVORK5CYII=';
|
|
||||||
else
|
|
||||||
core.dom.musicBtn.src =
|
|
||||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABYlBMVEX///9iYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmJiYmL////8/PwAAABmZmZoaGihoaGioqKxsbG5ubnb29vc3Nzd3d3h4eHi4uL9/f3+/v4tLS1nZ2d0dHSUlJSenp66uroMDAz7+/spKSkoKCgUFBRpaWkVFRVvb291dXU7OzuVlZWYmJhkZGQgICAjIyOkpKQCAgK3t7cGBgbv7++pqamrq6seHh4mJiZhYWGamprp6enr6+saGhpeXl7j4+Pl5eXm5uZKSkrw8PD09PT19fW7u7vDw8PMzMwICAgwMDAyMjILCwtAQECGhoaHh4eBgYGFhYUSEhJXV1dZWVlcXFyOjo6SkpLNzc339/fPz8/Z2dna2tqTk5OlpaWxOPeTAAAAdnRSTlMAAwQFBhUWGxwkJSYyO0dISVBRUmpvj5CSk5SVoaOlpqiysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKyNuo+uwAAAWJJREFUeF5NkmV34zAQReUm7WbTuJBNunY3bvXGDjNTkZkZlpn5/9eR5FPfbzr3jGb0RkwRiMQMDm7EIgHmRxtLwMOaHHoQjwz4MUKeCM8AWMrmd7u7f/aXAMyOShHiQD1n04DtN5e5FMBFlSauIsm585dKi4CpuSYKJIv1tBDVmvOSqJgEoowFLSBHaQh10XHWiCgHWEGmAw2blPrvOK/KRJUGoLM4kCVSKrWz7HwgoiwQZyaQJ0+9PvxV23BNATAZB25IqX9b3+jTW9fcApwB6NLgUD5NY3mPXnwmFwBezff1ztzRFzTp94FXMy36HDuCa2RafdnnmZqtL818Gl9/qNnEeyrUk2aTPiKj3qMyWBVi/YSuWq5qiwxkbtX3vYWzdz/l8M0k8ERlvViiB1Ygslb7SbVtJezncj+Cx5bYaeGuonZqhZlieAp+no74/s5EAh6JcY35Cepxk4ObcT3IJPe/1lKsDpFCFQAAAABJRU5ErkJggg==';
|
|
||||||
};
|
|
||||||
|
|
||||||
////// 更改背景音乐的播放 //////
|
////// 更改背景音乐的播放 //////
|
||||||
control.prototype.triggerBgm = function () {
|
control.prototype.triggerBgm = function () {
|
||||||
@ -4199,10 +4191,6 @@ control.prototype._resize_gameGroup = function (obj) {
|
|||||||
var startBackground = core.domStyle.isVertical
|
var startBackground = core.domStyle.isVertical
|
||||||
? main.styles.startVerticalBackground || main.styles.startBackground
|
? main.styles.startVerticalBackground || main.styles.startBackground
|
||||||
: main.styles.startBackground;
|
: main.styles.startBackground;
|
||||||
if (main.dom.startBackground.getAttribute('__src__') != startBackground) {
|
|
||||||
main.dom.startBackground.setAttribute('__src__', startBackground);
|
|
||||||
main.dom.startBackground.src = startBackground;
|
|
||||||
}
|
|
||||||
|
|
||||||
var gameGroup = core.dom.gameGroup;
|
var gameGroup = core.dom.gameGroup;
|
||||||
var totalWidth, totalHeight;
|
var totalWidth, totalHeight;
|
||||||
@ -4238,15 +4226,6 @@ control.prototype._resize_gameGroup = function (obj) {
|
|||||||
floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + 'px';
|
floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + 'px';
|
||||||
// startPanel
|
// startPanel
|
||||||
core.dom.startPanel.style.fontSize = 16 * core.domStyle.scale + 'px';
|
core.dom.startPanel.style.fontSize = 16 * core.domStyle.scale + 'px';
|
||||||
// musicBtn
|
|
||||||
if (core.domStyle.isVertical || core.domStyle.scale < 1) {
|
|
||||||
core.dom.musicBtn.style.right = core.dom.musicBtn.style.bottom = '3px';
|
|
||||||
} else {
|
|
||||||
core.dom.musicBtn.style.right =
|
|
||||||
(obj.clientWidth - totalWidth) / 2 + 'px';
|
|
||||||
core.dom.musicBtn.style.bottom =
|
|
||||||
(obj.clientHeight - totalHeight) / 2 - 27 + 'px';
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._resize_canvas = function (obj) {
|
control.prototype._resize_canvas = function (obj) {
|
||||||
|
@ -312,8 +312,6 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
core._afterLoadResources(callback);
|
core._afterLoadResources(callback);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
core.dom.musicBtn.style.display = 'block';
|
|
||||||
core.setMusicBtn();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
core.prototype._init_flags = function () {
|
core.prototype._init_flags = function () {
|
||||||
@ -331,7 +329,6 @@ core.prototype._init_flags = function () {
|
|||||||
core.dom.versionLabel.innerText = core.firstData.version;
|
core.dom.versionLabel.innerText = core.firstData.version;
|
||||||
core.dom.logoLabel.innerText = core.firstData.title;
|
core.dom.logoLabel.innerText = core.firstData.title;
|
||||||
document.title = core.firstData.title + ' - HTML5魔塔';
|
document.title = core.firstData.title + ' - HTML5魔塔';
|
||||||
document.getElementById('startLogo').innerText = core.firstData.title;
|
|
||||||
(core.firstData.shops || []).forEach(function (t) {
|
(core.firstData.shops || []).forEach(function (t) {
|
||||||
core.initStatus.shops[t.id] = t;
|
core.initStatus.shops[t.id] = t;
|
||||||
});
|
});
|
||||||
|
@ -23,9 +23,10 @@ events.prototype.resetGame = function (hero, hard, floorId, maps, values) {
|
|||||||
|
|
||||||
////// 游戏开始事件 //////
|
////// 游戏开始事件 //////
|
||||||
events.prototype.startGame = function (hard, seed, route, callback) {
|
events.prototype.startGame = function (hard, seed, route, callback) {
|
||||||
main.dom.levelChooseButtons.style.display = 'none';
|
|
||||||
main.dom.startButtonGroup.style.display = 'none';
|
|
||||||
hard = hard || '';
|
hard = hard || '';
|
||||||
|
core.dom.gameGroup.style.display = 'block';
|
||||||
|
core.plugin.startOpened.value = false;
|
||||||
|
core.plugin.loaded.value = false;
|
||||||
|
|
||||||
if (main.mode != 'play') return;
|
if (main.mode != 'play') return;
|
||||||
|
|
||||||
@ -310,6 +311,7 @@ events.prototype._gameOver_askRate = function (ending) {
|
|||||||
|
|
||||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||||
events.prototype.restart = function () {
|
events.prototype.restart = function () {
|
||||||
|
core.hideStatusBar();
|
||||||
core.showStartAnimate();
|
core.showStartAnimate();
|
||||||
core.playBgm(main.startBgm);
|
core.playBgm(main.startBgm);
|
||||||
};
|
};
|
||||||
|
128
main.js
128
main.js
@ -29,9 +29,6 @@ function main() {
|
|||||||
startTopProgressBar: document.getElementById('startTopProgressBar'),
|
startTopProgressBar: document.getElementById('startTopProgressBar'),
|
||||||
startTopProgress: document.getElementById('startTopProgress'),
|
startTopProgress: document.getElementById('startTopProgress'),
|
||||||
startTopLoadTips: document.getElementById('startTopLoadTips'),
|
startTopLoadTips: document.getElementById('startTopLoadTips'),
|
||||||
startBackground: document.getElementById('startBackground'),
|
|
||||||
startLogo: document.getElementById('startLogo'),
|
|
||||||
startButtonGroup: document.getElementById('startButtonGroup'),
|
|
||||||
floorMsgGroup: document.getElementById('floorMsgGroup'),
|
floorMsgGroup: document.getElementById('floorMsgGroup'),
|
||||||
logoLabel: document.getElementById('logoLabel'),
|
logoLabel: document.getElementById('logoLabel'),
|
||||||
versionLabel: document.getElementById('versionLabel'),
|
versionLabel: document.getElementById('versionLabel'),
|
||||||
@ -239,22 +236,20 @@ main.prototype.init = function (mode, callback) {
|
|||||||
var mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
|
var mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
|
||||||
for (var ii in mainData) main[ii] = mainData[ii];
|
for (var ii in mainData) main[ii] = mainData[ii];
|
||||||
|
|
||||||
main.dom.startLogo.style = main.styles.startLogoStyle;
|
// main.levelChoose = main.levelChoose || [];
|
||||||
main.dom.startButtonGroup.style = main.styles.startButtonsStyle;
|
// main.levelChoose.forEach(function (value) {
|
||||||
main.levelChoose = main.levelChoose || [];
|
// var span = document.createElement('span');
|
||||||
main.levelChoose.forEach(function (value) {
|
// span.setAttribute('class', 'startButton');
|
||||||
var span = document.createElement('span');
|
// span.innerText = value.title || '';
|
||||||
span.setAttribute('class', 'startButton');
|
// span.id = value.name;
|
||||||
span.innerText = value.title || '';
|
// (function (span, str_) {
|
||||||
span.id = value.name;
|
// span.onclick = function () {
|
||||||
(function (span, str_) {
|
// core.events.startGame(str_);
|
||||||
span.onclick = function () {
|
// };
|
||||||
core.events.startGame(str_);
|
// })(span, value.name || '');
|
||||||
};
|
// main.dom.levelChooseButtons.appendChild(span);
|
||||||
})(span, value.name || '');
|
// });
|
||||||
main.dom.levelChooseButtons.appendChild(span);
|
|
||||||
});
|
|
||||||
main.createOnChoiceAnimation();
|
|
||||||
main.importFonts(main.fonts);
|
main.importFonts(main.fonts);
|
||||||
|
|
||||||
main.loadJs('libs', main.loadList, function () {
|
main.loadJs('libs', main.loadList, function () {
|
||||||
@ -491,30 +486,6 @@ main.prototype.createOnChoiceAnimation = function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
////// 选项 //////
|
|
||||||
main.prototype.selectButton = function (index) {
|
|
||||||
var select = function (children) {
|
|
||||||
index = (index + children.length) % children.length;
|
|
||||||
for (var i = 0; i < children.length; ++i) {
|
|
||||||
children[i].classList.remove('onChoiceAnimate');
|
|
||||||
}
|
|
||||||
children[index].classList.add('onChoiceAnimate');
|
|
||||||
if (main.selectedButton == index) {
|
|
||||||
children[index].click();
|
|
||||||
} else {
|
|
||||||
main.selectedButton = index;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (core.dom.startPanel.style.display != 'block') return;
|
|
||||||
|
|
||||||
if (main.dom.startButtons.style.display == 'block') {
|
|
||||||
select(main.dom.startButtons.children);
|
|
||||||
} else if (main.dom.levelChooseButtons.style.display == 'block') {
|
|
||||||
select(main.dom.levelChooseButtons.children);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
////// 创建字体 //////
|
////// 创建字体 //////
|
||||||
main.prototype.importFonts = function (fonts) {
|
main.prototype.importFonts = function (fonts) {
|
||||||
if (!(fonts instanceof Array) || fonts.length == 0) return;
|
if (!(fonts instanceof Array) || fonts.length == 0) return;
|
||||||
@ -610,21 +581,6 @@ main.prototype.listen = function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
[main.dom.startButtons, main.dom.levelChooseButtons].forEach(function (
|
|
||||||
dom
|
|
||||||
) {
|
|
||||||
dom.onmousemove = function (e) {
|
|
||||||
for (var i = 0; i < dom.children.length; ++i) {
|
|
||||||
if (
|
|
||||||
dom.children[i] == e.target &&
|
|
||||||
i != (main.selectedButton || 0)
|
|
||||||
) {
|
|
||||||
main.selectButton(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
////// 开始选择时 //////
|
////// 开始选择时 //////
|
||||||
main.dom.body.onselectstart = function () {
|
main.dom.body.onselectstart = function () {
|
||||||
return false;
|
return false;
|
||||||
@ -932,38 +888,38 @@ main.prototype.listen = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
////// 点击“开始游戏”时 //////
|
////// 点击“开始游戏”时 //////
|
||||||
main.dom.playGame.onclick = function () {
|
// main.dom.playGame.onclick = function () {
|
||||||
main.dom.startButtons.style.display = 'none';
|
// main.dom.startButtons.style.display = 'none';
|
||||||
main.core.control.checkBgm();
|
// main.core.control.checkBgm();
|
||||||
|
|
||||||
if (main.levelChoose.length == 0) {
|
// if (main.levelChoose.length == 0) {
|
||||||
core.events.startGame('');
|
// core.events.startGame('');
|
||||||
} else {
|
// } else {
|
||||||
main.dom.levelChooseButtons.style.display = 'block';
|
// main.dom.levelChooseButtons.style.display = 'block';
|
||||||
main.selectedButton = null;
|
// main.selectedButton = null;
|
||||||
main.selectButton(0);
|
// main.selectButton(0);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
////// 点击“载入游戏”时 //////
|
// ////// 点击“载入游戏”时 //////
|
||||||
main.dom.loadGame.onclick = function () {
|
// main.dom.loadGame.onclick = function () {
|
||||||
main.core.control.checkBgm();
|
// main.core.control.checkBgm();
|
||||||
main.core.load();
|
// main.core.load();
|
||||||
};
|
// };
|
||||||
|
|
||||||
////// 点击“录像回放”时 //////
|
// ////// 点击“录像回放”时 //////
|
||||||
main.dom.replayGame.onclick = function () {
|
// main.dom.replayGame.onclick = function () {
|
||||||
main.core.control.checkBgm();
|
// main.core.control.checkBgm();
|
||||||
main.core.chooseReplayFile();
|
// main.core.chooseReplayFile();
|
||||||
};
|
// };
|
||||||
|
|
||||||
main.dom.musicBtn.onclick = function () {
|
// main.dom.musicBtn.onclick = function () {
|
||||||
try {
|
// try {
|
||||||
if (main.core) main.core.triggerBgm();
|
// if (main.core) main.core.triggerBgm();
|
||||||
} catch (ee) {
|
// } catch (ee) {
|
||||||
console.error(ee);
|
// console.error(ee);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
window.onblur = function () {
|
window.onblur = function () {
|
||||||
if (main.core && main.core.control) {
|
if (main.core && main.core.control) {
|
||||||
|
Binary file not shown.
@ -49,9 +49,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
if (core.hasFlag('hideStatusBar'))
|
if (core.hasFlag('hideStatusBar'))
|
||||||
core.hideStatusBar(core.hasFlag('showToolbox'));
|
core.hideStatusBar(core.hasFlag('showToolbox'));
|
||||||
else core.showStatusBar();
|
else core.showStatusBar();
|
||||||
// 隐藏右下角的音乐按钮
|
|
||||||
core.dom.musicBtn.style.display = 'none';
|
|
||||||
core.dom.enlargeBtn.style.display = 'none';
|
|
||||||
if (main.mode === 'play' && !main.replayChecking) {
|
if (main.mode === 'play' && !main.replayChecking) {
|
||||||
core.splitArea();
|
core.splitArea();
|
||||||
core.resetFlagSettings();
|
core.resetFlagSettings();
|
||||||
|
40
styles.css
40
styles.css
@ -35,9 +35,9 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#musicBtn {
|
#musicBtn {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
bottom: 3px;
|
bottom: 3px;
|
||||||
right: 3px;
|
right: -20%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 400;
|
z-index: 400;
|
||||||
display: none;
|
display: none;
|
||||||
@ -107,6 +107,7 @@ body {
|
|||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
z-index: 260;
|
z-index: 260;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
filter: sepia(30%) contrast(70%);
|
||||||
}
|
}
|
||||||
|
|
||||||
#startLogo {
|
#startLogo {
|
||||||
@ -152,24 +153,17 @@ body {
|
|||||||
display: none;
|
display: none;
|
||||||
z-index: 310;
|
z-index: 310;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin-bottom: 5%;
|
margin-bottom: 7%;
|
||||||
left: 50%;
|
left: 30%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
padding: 15px 25px;
|
padding: 15px 25px;
|
||||||
/* default value */
|
|
||||||
background-image: linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
rgba(76, 73, 255, 0.7),
|
|
||||||
rgba(106, 40, 145, 0.7)
|
|
||||||
);
|
|
||||||
border: #ffffff 1px solid;
|
|
||||||
caret-color: #ffd700;
|
|
||||||
border-radius: 10px;
|
|
||||||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4),
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4),
|
||||||
0px 0px 1px rgba(255, 255, 255, 0.3);
|
0px 0px 1px rgba(255, 255, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#playGame {
|
#playGame {
|
||||||
|
position: relative;
|
||||||
|
left: 10%;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
@ -181,6 +175,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#loadGame {
|
#loadGame {
|
||||||
|
position: relative;
|
||||||
|
left: 5%;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
@ -192,6 +188,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#replayGame {
|
#replayGame {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
color: transparent;
|
color: transparent;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
@ -210,14 +208,6 @@ body {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#easy {
|
|
||||||
background-image: linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
rgb(255, 255, 255),
|
|
||||||
rgb(87, 255, 72)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
span#hard {
|
span#hard {
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
@ -247,10 +237,6 @@ span#hard {
|
|||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.startButton:hover {
|
|
||||||
transform: scale(1.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.onChoiceAnimate {
|
.onChoiceAnimate {
|
||||||
animation: onChoice 2s ease-in-out 0s infinite normal none running;
|
animation: onChoice 2s ease-in-out 0s infinite normal none running;
|
||||||
}
|
}
|
||||||
@ -604,8 +590,8 @@ p#name {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.startImageDivAnimation {
|
.startImageDivAnimation {
|
||||||
-webkit-animation: startImageDivDisappear 2s ease-in-out 5s alternate 1;
|
-webkit-animation: startImageDivDisappear 2s ease-in-out 3s alternate 1;
|
||||||
animation: startImageDivDisappear 2s ease-in-out 5s alternate 1;
|
animation: startImageDivDisappear 2s ease-in-out 3s alternate 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-webkit-keyframes startImageDivDisappear {
|
@-webkit-keyframes startImageDivDisappear {
|
||||||
|
Loading…
Reference in New Issue
Block a user