mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 23:29:27 +08:00
修改插件加载机制
This commit is contained in:
parent
0604c56e98
commit
d2746c4dc5
2
idea.md
2
idea.md
@ -65,7 +65,7 @@ dam4.png ---- 存档 59
|
|||||||
[] 每个怪物加一个怪物说明
|
[] 每个怪物加一个怪物说明
|
||||||
[] 歌词展示系统
|
[] 歌词展示系统
|
||||||
[] 小地图显示框,可以选择是否显示剩余怪物数量等
|
[] 小地图显示框,可以选择是否显示剩余怪物数量等
|
||||||
[] 怪物死亡特效
|
[x] 怪物死亡特效
|
||||||
[] 区域名称显示特效,3D 粒子特效
|
[] 区域名称显示特效,3D 粒子特效
|
||||||
[] 单独的工具栏
|
[] 单独的工具栏
|
||||||
[] 完全 ts 化
|
[] 完全 ts 化
|
||||||
|
48
index.html
48
index.html
@ -24,30 +24,30 @@
|
|||||||
<img id='startImageLogo' />
|
<img id='startImageLogo' />
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
// (function () {
|
||||||
var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
|
// var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
|
||||||
var startImageLogo = document.getElementById('startImageLogo');
|
// var startImageLogo = document.getElementById('startImageLogo');
|
||||||
var startImageDiv = document.getElementById('startImageDiv');
|
// var startImageDiv = document.getElementById('startImageDiv');
|
||||||
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) {
|
// if (window.core && core.plugin && ancTe.plugin.ui.startAnimationEnded) {
|
||||||
core.plugin.startAnimationEnded.value = true;
|
// ancTe.plugin.ui.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");
|
||||||
startImageDiv.classList.add("startImageDivAnimation");
|
// startImageDiv.classList.add("startImageDivAnimation");
|
||||||
// 注释下面这句话以禁止单击立刻跳过开场动画
|
// // 注释下面这句话以禁止单击立刻跳过开场动画
|
||||||
startImageBackgroundDiv.onclick = onAnimationEnd;
|
// startImageBackgroundDiv.onclick = onAnimationEnd;
|
||||||
}
|
// }
|
||||||
startImageLogo.onerror = function () { }
|
// startImageLogo.onerror = function () { }
|
||||||
startImageLogo.src = "logo.png";
|
// startImageLogo.src = "logo.png";
|
||||||
})();
|
// })();
|
||||||
</script>
|
</script>
|
||||||
<div id="game">
|
<div id="game">
|
||||||
<!-- injection -->
|
<!-- injection -->
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"lz-string": "^1.5.0",
|
"lz-string": "^1.5.0",
|
||||||
"mutate-animate": "^1.2.3",
|
"mutate-animate": "^1.3.1",
|
||||||
"three": "^0.149.0",
|
"three": "^0.149.0",
|
||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
},
|
},
|
||||||
@ -51,7 +51,7 @@
|
|||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"fs-extra": "^10.1.0",
|
"fs-extra": "^10.1.0",
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
"rollup": "^3.26.3",
|
"rollup": "^3.27.0",
|
||||||
"terser": "^5.19.2",
|
"terser": "^5.19.2",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
|
124
pnpm-lock.yaml
124
pnpm-lock.yaml
@ -27,8 +27,8 @@ dependencies:
|
|||||||
specifier: ^1.5.0
|
specifier: ^1.5.0
|
||||||
version: 1.5.0
|
version: 1.5.0
|
||||||
mutate-animate:
|
mutate-animate:
|
||||||
specifier: ^1.2.3
|
specifier: ^1.3.1
|
||||||
version: 1.2.3
|
version: 1.3.1
|
||||||
three:
|
three:
|
||||||
specifier: ^0.149.0
|
specifier: ^0.149.0
|
||||||
version: 0.149.0
|
version: 0.149.0
|
||||||
@ -48,22 +48,22 @@ devDependencies:
|
|||||||
version: 7.22.9(@babel/core@7.22.9)
|
version: 7.22.9(@babel/core@7.22.9)
|
||||||
'@rollup/plugin-babel':
|
'@rollup/plugin-babel':
|
||||||
specifier: ^6.0.3
|
specifier: ^6.0.3
|
||||||
version: 6.0.3(@babel/core@7.22.9)(@types/babel__core@7.20.1)(rollup@3.26.3)
|
version: 6.0.3(@babel/core@7.22.9)(@types/babel__core@7.20.1)(rollup@3.27.0)
|
||||||
'@rollup/plugin-commonjs':
|
'@rollup/plugin-commonjs':
|
||||||
specifier: ^25.0.3
|
specifier: ^25.0.3
|
||||||
version: 25.0.3(rollup@3.26.3)
|
version: 25.0.3(rollup@3.27.0)
|
||||||
'@rollup/plugin-node-resolve':
|
'@rollup/plugin-node-resolve':
|
||||||
specifier: ^15.1.0
|
specifier: ^15.1.0
|
||||||
version: 15.1.0(rollup@3.26.3)
|
version: 15.1.0(rollup@3.27.0)
|
||||||
'@rollup/plugin-replace':
|
'@rollup/plugin-replace':
|
||||||
specifier: ^5.0.2
|
specifier: ^5.0.2
|
||||||
version: 5.0.2(rollup@3.26.3)
|
version: 5.0.2(rollup@3.27.0)
|
||||||
'@rollup/plugin-terser':
|
'@rollup/plugin-terser':
|
||||||
specifier: ^0.4.3
|
specifier: ^0.4.3
|
||||||
version: 0.4.3(rollup@3.26.3)
|
version: 0.4.3(rollup@3.27.0)
|
||||||
'@rollup/plugin-typescript':
|
'@rollup/plugin-typescript':
|
||||||
specifier: ^11.1.2
|
specifier: ^11.1.2
|
||||||
version: 11.1.2(rollup@3.26.3)(typescript@5.1.6)
|
version: 11.1.2(rollup@3.27.0)(typescript@5.1.6)
|
||||||
'@types/babel__core':
|
'@types/babel__core':
|
||||||
specifier: ^7.20.1
|
specifier: ^7.20.1
|
||||||
version: 7.20.1
|
version: 7.20.1
|
||||||
@ -110,8 +110,8 @@ devDependencies:
|
|||||||
specifier: ^4.1.3
|
specifier: ^4.1.3
|
||||||
version: 4.1.3
|
version: 4.1.3
|
||||||
rollup:
|
rollup:
|
||||||
specifier: ^3.26.3
|
specifier: ^3.27.0
|
||||||
version: 3.26.3
|
version: 3.27.0
|
||||||
terser:
|
terser:
|
||||||
specifier: ^5.19.2
|
specifier: ^5.19.2
|
||||||
version: 5.19.2
|
version: 5.19.2
|
||||||
@ -123,7 +123,7 @@ devDependencies:
|
|||||||
version: 5.1.6
|
version: 5.1.6
|
||||||
unplugin-vue-components:
|
unplugin-vue-components:
|
||||||
specifier: ^0.22.12
|
specifier: ^0.22.12
|
||||||
version: 0.22.12(rollup@3.26.3)(vue@3.3.4)
|
version: 0.22.12(rollup@3.27.0)(vue@3.3.4)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^4.4.7
|
specifier: ^4.4.7
|
||||||
version: 4.4.7(@types/node@18.17.1)(less@4.1.3)(terser@5.19.2)
|
version: 4.4.7(@types/node@18.17.1)(less@4.1.3)(terser@5.19.2)
|
||||||
@ -256,7 +256,7 @@ packages:
|
|||||||
'@babel/compat-data': 7.22.9
|
'@babel/compat-data': 7.22.9
|
||||||
'@babel/core': 7.22.9
|
'@babel/core': 7.22.9
|
||||||
'@babel/helper-validator-option': 7.22.5
|
'@babel/helper-validator-option': 7.22.5
|
||||||
browserslist: 4.21.9
|
browserslist: 4.21.10
|
||||||
lru-cache: 5.1.1
|
lru-cache: 5.1.1
|
||||||
semver: 6.3.1
|
semver: 6.3.1
|
||||||
dev: true
|
dev: true
|
||||||
@ -1711,7 +1711,7 @@ packages:
|
|||||||
dev: true
|
dev: true
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/@rollup/plugin-babel@6.0.3(@babel/core@7.22.9)(@types/babel__core@7.20.1)(rollup@3.26.3):
|
/@rollup/plugin-babel@6.0.3(@babel/core@7.22.9)(@types/babel__core@7.20.1)(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==}
|
resolution: {integrity: sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1726,12 +1726,12 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.22.9
|
'@babel/core': 7.22.9
|
||||||
'@babel/helper-module-imports': 7.22.5
|
'@babel/helper-module-imports': 7.22.5
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
'@types/babel__core': 7.20.1
|
'@types/babel__core': 7.20.1
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/plugin-commonjs@25.0.3(rollup@3.26.3):
|
/@rollup/plugin-commonjs@25.0.3(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA==}
|
resolution: {integrity: sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1740,16 +1740,16 @@ packages:
|
|||||||
rollup:
|
rollup:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
commondir: 1.0.1
|
commondir: 1.0.1
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
glob: 8.1.0
|
glob: 8.1.0
|
||||||
is-reference: 1.2.1
|
is-reference: 1.2.1
|
||||||
magic-string: 0.27.0
|
magic-string: 0.27.0
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/plugin-node-resolve@15.1.0(rollup@3.26.3):
|
/@rollup/plugin-node-resolve@15.1.0(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==}
|
resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1758,16 +1758,16 @@ packages:
|
|||||||
rollup:
|
rollup:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
'@types/resolve': 1.20.2
|
'@types/resolve': 1.20.2
|
||||||
deepmerge: 4.3.1
|
deepmerge: 4.3.1
|
||||||
is-builtin-module: 3.2.1
|
is-builtin-module: 3.2.1
|
||||||
is-module: 1.0.0
|
is-module: 1.0.0
|
||||||
resolve: 1.22.2
|
resolve: 1.22.2
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/plugin-replace@5.0.2(rollup@3.26.3):
|
/@rollup/plugin-replace@5.0.2(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==}
|
resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1776,12 +1776,12 @@ packages:
|
|||||||
rollup:
|
rollup:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
magic-string: 0.27.0
|
magic-string: 0.27.0
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/plugin-terser@0.4.3(rollup@3.26.3):
|
/@rollup/plugin-terser@0.4.3(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-EF0oejTMtkyhrkwCdg0HJ0IpkcaVg1MMSf2olHb2Jp+1mnLM04OhjpJWGma4HobiDTF0WCyViWuvadyE9ch2XA==}
|
resolution: {integrity: sha512-EF0oejTMtkyhrkwCdg0HJ0IpkcaVg1MMSf2olHb2Jp+1mnLM04OhjpJWGma4HobiDTF0WCyViWuvadyE9ch2XA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1790,13 +1790,13 @@ packages:
|
|||||||
rollup:
|
rollup:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
serialize-javascript: 6.0.1
|
serialize-javascript: 6.0.1
|
||||||
smob: 1.4.0
|
smob: 1.4.0
|
||||||
terser: 5.19.2
|
terser: 5.19.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/plugin-typescript@11.1.2(rollup@3.26.3)(typescript@5.1.6):
|
/@rollup/plugin-typescript@11.1.2(rollup@3.27.0)(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-0ghSOCMcA7fl1JM+0gYRf+Q/HWyg+zg7/gDSc+fRLmlJWcW5K1I+CLRzaRhXf4Y3DRyPnnDo4M2ktw+a6JcDEg==}
|
resolution: {integrity: sha512-0ghSOCMcA7fl1JM+0gYRf+Q/HWyg+zg7/gDSc+fRLmlJWcW5K1I+CLRzaRhXf4Y3DRyPnnDo4M2ktw+a6JcDEg==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1809,13 +1809,13 @@ packages:
|
|||||||
tslib:
|
tslib:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
resolve: 1.22.2
|
resolve: 1.22.2
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
typescript: 5.1.6
|
typescript: 5.1.6
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@rollup/pluginutils@5.0.2(rollup@3.26.3):
|
/@rollup/pluginutils@5.0.2(rollup@3.27.0):
|
||||||
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
|
resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -1827,7 +1827,7 @@ packages:
|
|||||||
'@types/estree': 1.0.1
|
'@types/estree': 1.0.1
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
picomatch: 2.3.1
|
picomatch: 2.3.1
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@simonwep/pickr@1.8.2:
|
/@simonwep/pickr@1.8.2:
|
||||||
@ -1944,9 +1944,9 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.22.9
|
'@babel/core': 7.22.9
|
||||||
'@babel/preset-env': 7.22.9(@babel/core@7.22.9)
|
'@babel/preset-env': 7.22.9(@babel/core@7.22.9)
|
||||||
browserslist: 4.21.9
|
browserslist: 4.21.10
|
||||||
core-js: 3.32.0
|
core-js: 3.32.0
|
||||||
magic-string: 0.30.1
|
magic-string: 0.30.2
|
||||||
regenerator-runtime: 0.13.11
|
regenerator-runtime: 0.13.11
|
||||||
systemjs: 6.14.1
|
systemjs: 6.14.1
|
||||||
terser: 5.19.2
|
terser: 5.19.2
|
||||||
@ -2047,7 +2047,7 @@ packages:
|
|||||||
'@vue/reactivity-transform': 3.3.4
|
'@vue/reactivity-transform': 3.3.4
|
||||||
'@vue/shared': 3.3.4
|
'@vue/shared': 3.3.4
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
magic-string: 0.30.1
|
magic-string: 0.30.2
|
||||||
postcss: 8.4.27
|
postcss: 8.4.27
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
@ -2083,7 +2083,7 @@ packages:
|
|||||||
'@vue/compiler-core': 3.3.4
|
'@vue/compiler-core': 3.3.4
|
||||||
'@vue/shared': 3.3.4
|
'@vue/shared': 3.3.4
|
||||||
estree-walker: 2.0.2
|
estree-walker: 2.0.2
|
||||||
magic-string: 0.30.1
|
magic-string: 0.30.2
|
||||||
|
|
||||||
/@vue/reactivity@3.3.4:
|
/@vue/reactivity@3.3.4:
|
||||||
resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==}
|
resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==}
|
||||||
@ -2366,15 +2366,15 @@ packages:
|
|||||||
fill-range: 7.0.1
|
fill-range: 7.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/browserslist@4.21.9:
|
/browserslist@4.21.10:
|
||||||
resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==}
|
resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==}
|
||||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001517
|
caniuse-lite: 1.0.30001518
|
||||||
electron-to-chromium: 1.4.475
|
electron-to-chromium: 1.4.478
|
||||||
node-releases: 2.0.13
|
node-releases: 2.0.13
|
||||||
update-browserslist-db: 1.0.11(browserslist@4.21.9)
|
update-browserslist-db: 1.0.11(browserslist@4.21.10)
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/buffer-alloc-unsafe@1.1.0:
|
/buffer-alloc-unsafe@1.1.0:
|
||||||
@ -2467,8 +2467,8 @@ packages:
|
|||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/caniuse-lite@1.0.30001517:
|
/caniuse-lite@1.0.30001518:
|
||||||
resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==}
|
resolution: {integrity: sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/chalk@2.4.2:
|
/chalk@2.4.2:
|
||||||
@ -2648,7 +2648,7 @@ packages:
|
|||||||
/core-js-compat@3.32.0:
|
/core-js-compat@3.32.0:
|
||||||
resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==}
|
resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.21.9
|
browserslist: 4.21.10
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/core-js@3.32.0:
|
/core-js@3.32.0:
|
||||||
@ -2780,8 +2780,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron-to-chromium@1.4.475:
|
/electron-to-chromium@1.4.478:
|
||||||
resolution: {integrity: sha512-mTye5u5P98kSJO2n7zYALhpJDmoSQejIGya0iR01GpoRady8eK3bw7YHHnjA1Rfi4ZSLdpuzlAC7Zw+1Zu7Z6A==}
|
resolution: {integrity: sha512-qjTA8djMXd+ruoODDFGnRCRBpID+AAfYWCyGtYTNhsuwxI19s8q19gbjKTwRS5z/LyVf5wICaIiPQGLekmbJbA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@8.0.0:
|
/emoji-regex@8.0.0:
|
||||||
@ -2897,8 +2897,8 @@ packages:
|
|||||||
micromatch: 4.0.5
|
micromatch: 4.0.5
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/fast-xml-parser@4.2.6:
|
/fast-xml-parser@4.2.7:
|
||||||
resolution: {integrity: sha512-Xo1qV++h/Y3Ng8dphjahnYe+rGHaaNdsYOBWL9Y9GCPKpNKilJtilvWkLcI9f9X2DoKTLsZsGYAls5+JL5jfLA==}
|
resolution: {integrity: sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
strnum: 1.0.5
|
strnum: 1.0.5
|
||||||
@ -2998,7 +2998,7 @@ packages:
|
|||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
cross-spawn: 7.0.3
|
cross-spawn: 7.0.3
|
||||||
signal-exit: 4.0.2
|
signal-exit: 4.1.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/form-data@4.0.0:
|
/form-data@4.0.0:
|
||||||
@ -3427,7 +3427,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-v+AgVwiK5DsGtT9ng+m4mClp6zDAmwrW8nZi6Gg15qzvBnRWWdfWA1TGaXyCDnWq5g5asofIgMVl3PjKxvk1ug==}
|
resolution: {integrity: sha512-v+AgVwiK5DsGtT9ng+m4mClp6zDAmwrW8nZi6Gg15qzvBnRWWdfWA1TGaXyCDnWq5g5asofIgMVl3PjKxvk1ug==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-xml-parser: 4.2.6
|
fast-xml-parser: 4.2.7
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/is-ttf@0.2.2:
|
/is-ttf@0.2.2:
|
||||||
@ -3637,8 +3637,8 @@ packages:
|
|||||||
'@jridgewell/sourcemap-codec': 1.4.15
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/magic-string@0.30.1:
|
/magic-string@0.30.2:
|
||||||
resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==}
|
resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@jridgewell/sourcemap-codec': 1.4.15
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
@ -3860,8 +3860,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==}
|
resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/mutate-animate@1.2.3:
|
/mutate-animate@1.3.1:
|
||||||
resolution: {integrity: sha512-l2Ixv+/NZG0b8B5+ZctX+N/hZslPiSvN6WvzEbOIF0rXouX0br/Yg6/9uc5pQleYhYM2CUPouqrCaUu7Q8QxZg==}
|
resolution: {integrity: sha512-3jWiE4+0e8H1LDsTNqLP229OJoRNtoxhXmh7wtmrE82Jb/T/IhpvcMOOi0jE2K7fIpZ9d6ySZqIjHXpLmrL4lg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/nan@2.17.0:
|
/nan@2.17.0:
|
||||||
@ -4317,8 +4317,8 @@ packages:
|
|||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/rollup@3.26.3:
|
/rollup@3.27.0:
|
||||||
resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==}
|
resolution: {integrity: sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==}
|
||||||
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
|
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
@ -4405,8 +4405,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/signal-exit@4.0.2:
|
/signal-exit@4.1.0:
|
||||||
resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==}
|
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -4795,7 +4795,7 @@ packages:
|
|||||||
engines: {node: '>= 10.0.0'}
|
engines: {node: '>= 10.0.0'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/unplugin-vue-components@0.22.12(rollup@3.26.3)(vue@3.3.4):
|
/unplugin-vue-components@0.22.12(rollup@3.27.0)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-FxyzsuBvMCYPIk+8cgscGBQ345tvwVu+qY5IhE++eorkyvA4Z1TiD/HCiim+Kbqozl10i4K+z+NCa2WO2jexRA==}
|
resolution: {integrity: sha512-FxyzsuBvMCYPIk+8cgscGBQ345tvwVu+qY5IhE++eorkyvA4Z1TiD/HCiim+Kbqozl10i4K+z+NCa2WO2jexRA==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -4806,7 +4806,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.5
|
'@antfu/utils': 0.7.5
|
||||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||||
chokidar: 3.5.3
|
chokidar: 3.5.3
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
fast-glob: 3.3.1
|
fast-glob: 3.3.1
|
||||||
@ -4830,13 +4830,13 @@ packages:
|
|||||||
webpack-virtual-modules: 0.5.0
|
webpack-virtual-modules: 0.5.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/update-browserslist-db@1.0.11(browserslist@4.21.9):
|
/update-browserslist-db@1.0.11(browserslist@4.21.10):
|
||||||
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
|
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
browserslist: '>= 4.21.0'
|
browserslist: '>= 4.21.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.21.9
|
browserslist: 4.21.10
|
||||||
escalade: 3.1.1
|
escalade: 3.1.1
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
@ -4954,7 +4954,7 @@ packages:
|
|||||||
esbuild: 0.18.17
|
esbuild: 0.18.17
|
||||||
less: 4.1.3
|
less: 4.1.3
|
||||||
postcss: 8.4.27
|
postcss: 8.4.27
|
||||||
rollup: 3.26.3
|
rollup: 3.27.0
|
||||||
terser: 5.19.2
|
terser: 5.19.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents: 2.3.2
|
fsevents: 2.3.2
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv='content-type' content='text/html' charset='utf-8'>
|
<meta http-equiv='content-type' content='text/html' charset='utf-8'>
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=Edge, chrome=1'>
|
<meta http-equiv='X-UA-Compatible' content='IE=Edge, chrome=1'>
|
||||||
<meta name='author' content='ckcz123'>
|
<meta name='author' content='ckcz123'>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes'>
|
<meta name='viewport'
|
||||||
|
content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes'>
|
||||||
<title>HTML5魔塔</title>
|
<title>HTML5魔塔</title>
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="screen-orientation" content="portrait">
|
<meta name="screen-orientation" content="portrait">
|
||||||
<meta name="full-screen" content="yes">
|
<meta name="full-screen" content="yes">
|
||||||
<meta name="browsermode" content="application">
|
<meta name="browsermode" content="application">
|
||||||
@ -15,188 +17,190 @@
|
|||||||
<meta name="x5-page-mode" content="app">
|
<meta name="x5-page-mode" content="app">
|
||||||
<link type='text/css' href='styles.css' rel='stylesheet'>
|
<link type='text/css' href='styles.css' rel='stylesheet'>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<div id='startImageBackgroundDiv'>
|
|
||||||
<div id='startImageDiv'></div>
|
|
||||||
<img id='startImageLogo' />
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
|
|
||||||
var startImageLogo = document.getElementById('startImageLogo');
|
|
||||||
var startImageDiv = document.getElementById('startImageDiv');
|
|
||||||
startImageLogo.onload = function () {
|
|
||||||
startImageBackgroundDiv.style.display = 'block';
|
|
||||||
var onAnimationEnd = function () {
|
|
||||||
startImageBackgroundDiv.style.display = 'none';
|
|
||||||
startImageLogo.classList.remove("startImageAnimation");
|
|
||||||
startImageDiv.classList.remove("startImageDivAnimation");
|
|
||||||
}
|
|
||||||
startImageDiv.addEventListener("webkitAnimationEnd", onAnimationEnd);
|
|
||||||
startImageDiv.addEventListener("animationend", onAnimationEnd);
|
|
||||||
startImageLogo.classList.add("startImageAnimation");
|
|
||||||
startImageDiv.classList.add("startImageDivAnimation");
|
|
||||||
// 注释下面这句话以禁止单击立刻跳过开场动画
|
|
||||||
startImageBackgroundDiv.onclick = onAnimationEnd;
|
|
||||||
}
|
|
||||||
startImageLogo.onerror = function () {}
|
|
||||||
startImageLogo.src = "logo.png";
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<!-- injection -->
|
|
||||||
<div id='gameGroup'>
|
|
||||||
<p id='mainTips'>请稍候...</p>
|
|
||||||
<img id='musicBtn'>
|
|
||||||
<div id='startPanel'>
|
|
||||||
<div id='startTop'>
|
|
||||||
<div id='startTopProgressBar'>
|
|
||||||
<div id='startTopProgress'></div>
|
|
||||||
</div>
|
|
||||||
<p id='startTopLoadTips'>资源即将开始加载</p>
|
|
||||||
<p id='startTopHint'>HTML5魔塔游戏平台,享受更多魔塔游戏:<br/>https://h5mota.com/</p>
|
|
||||||
</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 id='floorMsgGroup'>
|
|
||||||
<p id='logoLabel'></p>
|
|
||||||
<p id='versionLabel'></p>
|
|
||||||
<p id='floorNameLabel'></p>
|
|
||||||
</div>
|
|
||||||
<div id='statusBar' class="clearfix">
|
|
||||||
<div class="status" id="floorCol">
|
|
||||||
<img id="img-floor">
|
|
||||||
<p class='statusLabel statusText' id='floor'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="nameCol">
|
|
||||||
<img id="img-name">
|
|
||||||
<p class='statusLabel statusText' id='name'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="lvCol">
|
|
||||||
<img id="img-lv">
|
|
||||||
<p class='statusLabel statusText' id='lv'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='hpmaxCol'>
|
|
||||||
<img id="img-hpmax">
|
|
||||||
<p class='statusLabel statusText' id='hpmax'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='hpCol'>
|
|
||||||
<img id="img-hp">
|
|
||||||
<p class='statusLabel statusText' id='hp'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='manaCol'>
|
|
||||||
<img id="img-mana">
|
|
||||||
<p class='statusLabel statusText' id='mana'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='atkCol'>
|
|
||||||
<img id="img-atk">
|
|
||||||
<p class='statusLabel statusText' id='atk'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='defCol'>
|
|
||||||
<img id="img-def">
|
|
||||||
<p class='statusLabel statusText' id='def'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="mdefCol">
|
|
||||||
<img id="img-mdef">
|
|
||||||
<p class='statusLabel statusText' id='mdef'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="moneyCol">
|
|
||||||
<img id="img-money">
|
|
||||||
<p class='statusLabel statusText' id='money'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="expCol">
|
|
||||||
<img id="img-exp">
|
|
||||||
<p class='statusLabel statusText' id='exp'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="upCol">
|
|
||||||
<img id="img-up">
|
|
||||||
<p class='statusLabel statusText' id='up'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="skillCol">
|
|
||||||
<img id="img-skill">
|
|
||||||
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='keyCol'>
|
|
||||||
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
|
||||||
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
|
||||||
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
|
|
||||||
<span class='statusLabel' id='greenKey' style="color:#88FF88"></span>
|
|
||||||
</div>
|
|
||||||
<div class="status" id='pzfCol'>
|
|
||||||
<span class='statusLabel' id='pickaxe' style="color: #BC6E27"></span>
|
|
||||||
<span class='statusLabel' id='bomb' style="color: #FA14B9"></span>
|
|
||||||
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
|
|
||||||
</div>
|
|
||||||
<div class="status" id="debuffCol">
|
|
||||||
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
|
|
||||||
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>
|
|
||||||
<span class='statusLabel' id='curse' style="color: #C2F4E7;"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 状态栏canvas化 -->
|
<body>
|
||||||
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
|
<div id='startImageBackgroundDiv'>
|
||||||
|
<div id='startImageDiv'></div>
|
||||||
|
<img id='startImageLogo' />
|
||||||
</div>
|
</div>
|
||||||
<div id="toolBar" class="clearfix">
|
<script>
|
||||||
<img class="tools" id='img-book'>
|
// (function () {
|
||||||
<img class="tools" id='img-fly'>
|
// var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
|
||||||
<img class="tools" id='img-toolbox'>
|
// var startImageLogo = document.getElementById('startImageLogo');
|
||||||
<img class="tools" id='img-keyboard'>
|
// var startImageDiv = document.getElementById('startImageDiv');
|
||||||
<img class="tools" id='img-shop'>
|
// startImageLogo.onload = function () {
|
||||||
<img class="tools" id='img-save'>
|
// startImageBackgroundDiv.style.display = 'block';
|
||||||
<img class="tools" id='img-load'>
|
// var onAnimationEnd = function () {
|
||||||
<img class="tools" id='img-settings'>
|
// startImageBackgroundDiv.style.display = 'none';
|
||||||
<img class="tools" id='img-btn1' style='display:none'>
|
// startImageLogo.classList.remove("startImageAnimation");
|
||||||
<img class="tools" id='img-btn2' style='display:none'>
|
// startImageDiv.classList.remove("startImageDivAnimation");
|
||||||
<img class="tools" id='img-btn3' style='display:none'>
|
// }
|
||||||
<img class="tools" id='img-btn4' style='display:none'>
|
// startImageDiv.addEventListener("webkitAnimationEnd", onAnimationEnd);
|
||||||
<img class="tools" id='img-btn5' style='display:none'>
|
// startImageDiv.addEventListener("animationend", onAnimationEnd);
|
||||||
<img class="tools" id='img-btn6' style='display:none'>
|
// startImageLogo.classList.add("startImageAnimation");
|
||||||
<img class="tools" id='img-btn7' style='display:none'>
|
// startImageDiv.classList.add("startImageDivAnimation");
|
||||||
<img class="tools" id='img-btn8' style='display:none'>
|
// // 注释下面这句话以禁止单击立刻跳过开场动画
|
||||||
<p class="statusLabel tools" id="hard"></p>
|
// startImageBackgroundDiv.onclick = onAnimationEnd;
|
||||||
|
// }
|
||||||
|
// startImageLogo.onerror = function () { }
|
||||||
|
// startImageLogo.src = "logo.png";
|
||||||
|
// })();
|
||||||
|
</script>
|
||||||
|
<!-- injection -->
|
||||||
|
<div id='gameGroup'>
|
||||||
|
<p id='mainTips'>请稍候...</p>
|
||||||
|
<img id='musicBtn'>
|
||||||
|
<div id='startPanel' style="display: none;">
|
||||||
|
<div id='startTop'>
|
||||||
|
<div id='startTopProgressBar'>
|
||||||
|
<div id='startTopProgress'></div>
|
||||||
|
</div>
|
||||||
|
<p id='startTopLoadTips'>资源即将开始加载</p>
|
||||||
|
<p id='startTopHint'>HTML5魔塔游戏平台,享受更多魔塔游戏:<br />https://h5mota.com/</p>
|
||||||
|
</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 id='floorMsgGroup'>
|
||||||
|
<p id='logoLabel'></p>
|
||||||
|
<p id='versionLabel'></p>
|
||||||
|
<p id='floorNameLabel'></p>
|
||||||
|
</div>
|
||||||
|
<div id='statusBar' class="clearfix">
|
||||||
|
<div class="status" id="floorCol">
|
||||||
|
<img id="img-floor">
|
||||||
|
<p class='statusLabel statusText' id='floor'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="nameCol">
|
||||||
|
<img id="img-name">
|
||||||
|
<p class='statusLabel statusText' id='name'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="lvCol">
|
||||||
|
<img id="img-lv">
|
||||||
|
<p class='statusLabel statusText' id='lv'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='hpmaxCol'>
|
||||||
|
<img id="img-hpmax">
|
||||||
|
<p class='statusLabel statusText' id='hpmax'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='hpCol'>
|
||||||
|
<img id="img-hp">
|
||||||
|
<p class='statusLabel statusText' id='hp'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='manaCol'>
|
||||||
|
<img id="img-mana">
|
||||||
|
<p class='statusLabel statusText' id='mana'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='atkCol'>
|
||||||
|
<img id="img-atk">
|
||||||
|
<p class='statusLabel statusText' id='atk'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='defCol'>
|
||||||
|
<img id="img-def">
|
||||||
|
<p class='statusLabel statusText' id='def'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="mdefCol">
|
||||||
|
<img id="img-mdef">
|
||||||
|
<p class='statusLabel statusText' id='mdef'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="moneyCol">
|
||||||
|
<img id="img-money">
|
||||||
|
<p class='statusLabel statusText' id='money'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="expCol">
|
||||||
|
<img id="img-exp">
|
||||||
|
<p class='statusLabel statusText' id='exp'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="upCol">
|
||||||
|
<img id="img-up">
|
||||||
|
<p class='statusLabel statusText' id='up'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="skillCol">
|
||||||
|
<img id="img-skill">
|
||||||
|
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='keyCol'>
|
||||||
|
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
|
||||||
|
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
|
||||||
|
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
|
||||||
|
<span class='statusLabel' id='greenKey' style="color:#88FF88"></span>
|
||||||
|
</div>
|
||||||
|
<div class="status" id='pzfCol'>
|
||||||
|
<span class='statusLabel' id='pickaxe' style="color: #BC6E27"></span>
|
||||||
|
<span class='statusLabel' id='bomb' style="color: #FA14B9"></span>
|
||||||
|
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
|
||||||
|
</div>
|
||||||
|
<div class="status" id="debuffCol">
|
||||||
|
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
|
||||||
|
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>
|
||||||
|
<span class='statusLabel' id='curse' style="color: #C2F4E7;"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 状态栏canvas化 -->
|
||||||
|
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
|
||||||
|
</div>
|
||||||
|
<div id="toolBar" class="clearfix">
|
||||||
|
<img class="tools" id='img-book'>
|
||||||
|
<img class="tools" id='img-fly'>
|
||||||
|
<img class="tools" id='img-toolbox'>
|
||||||
|
<img class="tools" id='img-keyboard'>
|
||||||
|
<img class="tools" id='img-shop'>
|
||||||
|
<img class="tools" id='img-save'>
|
||||||
|
<img class="tools" id='img-load'>
|
||||||
|
<img class="tools" id='img-settings'>
|
||||||
|
<img class="tools" id='img-btn1' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn2' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn3' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn4' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn5' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn6' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn7' style='display:none'>
|
||||||
|
<img class="tools" id='img-btn8' style='display:none'>
|
||||||
|
<p class="statusLabel tools" id="hard"></p>
|
||||||
|
</div>
|
||||||
|
<div id="gameDraw">
|
||||||
|
<div id="gif"></div>
|
||||||
|
<div id="gif2"></div>
|
||||||
|
<canvas class='gameCanvas' id='bg'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='event'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='hero'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='event2'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='fg'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='damage'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='animate'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='curtain'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='ui'></canvas>
|
||||||
|
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
|
||||||
|
<div id="next"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="gameDraw">
|
<div id='inputDiv'>
|
||||||
<div id="gif"></div>
|
<div id='inputDialog'>
|
||||||
<div id="gif2"></div>
|
<p id="inputMessage">请输入文字...</p>
|
||||||
<canvas class='gameCanvas' id='bg'></canvas>
|
<input id='inputBox' type="text" autocomplete="off" />
|
||||||
<canvas class='gameCanvas' id='event'></canvas>
|
<button id='inputYes'>确定</button>
|
||||||
<canvas class='gameCanvas' id='hero'></canvas>
|
<button id='inputNo'>取消</button>
|
||||||
<canvas class='gameCanvas' id='event2'></canvas>
|
</div>
|
||||||
<canvas class='gameCanvas' id='fg'></canvas>
|
|
||||||
<canvas class='gameCanvas' id='damage'></canvas>
|
|
||||||
<canvas class='gameCanvas' id='animate'></canvas>
|
|
||||||
<canvas class='gameCanvas' id='curtain'></canvas>
|
|
||||||
<canvas class='gameCanvas' id='ui'></canvas>
|
|
||||||
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
|
|
||||||
<div id="next"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div id="ui-editor"></div>
|
||||||
<div id='inputDiv'>
|
<!-- injection -->
|
||||||
<div id='inputDialog'>
|
<script src='libs/thirdparty/lz-string.min.js'></script>
|
||||||
<p id="inputMessage">请输入文字...</p>
|
<script src='libs/thirdparty/priority-queue.min.js'></script>
|
||||||
<input id='inputBox' type="text" autocomplete="off"/>
|
<script src='libs/thirdparty/localforage.min.js'></script>
|
||||||
<button id='inputYes'>确定</button>
|
<script src='libs/thirdparty/zip.min.js'></script>
|
||||||
<button id='inputNo'>取消</button>
|
<script src="libs/thirdparty/lodash.min.js"></script>
|
||||||
</div>
|
<script src="https://cdn.jsdelivr.net/npm/@vue/reactivity@3.2.39/dist/reactivity.global.prod.js"></script>
|
||||||
</div>
|
<script id='mainScript' src='main.js'></script>
|
||||||
<div id="ui-editor"></div>
|
<script>main.init('play'); main.listen();</script>
|
||||||
<!-- injection -->
|
|
||||||
<script src='libs/thirdparty/lz-string.min.js'></script>
|
|
||||||
<script src='libs/thirdparty/priority-queue.min.js'></script>
|
|
||||||
<script src='libs/thirdparty/localforage.min.js'></script>
|
|
||||||
<script src='libs/thirdparty/zip.min.js'></script>
|
|
||||||
<script src="libs/thirdparty/lodash.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@vue/reactivity@3.2.39/dist/reactivity.global.prod.js"></script>
|
|
||||||
<script id='mainScript' src='main.js'></script>
|
|
||||||
<script>main.init('play');main.listen();</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -481,7 +481,6 @@ control.prototype.showStartAnimate = function (noAnimate, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
control.prototype._showStartAnimate_resetDom = function () {
|
control.prototype._showStartAnimate_resetDom = function () {
|
||||||
if (main.mode === 'play') core.plugin.loaded.value = true;
|
|
||||||
core.status.played = false;
|
core.status.played = false;
|
||||||
core.dom.gameGroup.style.display = 'none';
|
core.dom.gameGroup.style.display = 'none';
|
||||||
core.clearStatus();
|
core.clearStatus();
|
||||||
@ -2318,8 +2317,8 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
1
|
1
|
||||||
)[0];
|
)[0];
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.plugin.startOpened.value = false;
|
ancTe.plugin.ui.startOpened.value = false;
|
||||||
core.plugin.loaded.value = false;
|
ancTe.plugin.ui.loaded.value = false;
|
||||||
}
|
}
|
||||||
if (core.isPlaying() && !core.status.gameOver) {
|
if (core.isPlaying() && !core.status.gameOver) {
|
||||||
core.control.autosave(0);
|
core.control.autosave(0);
|
||||||
@ -2336,8 +2335,8 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
null,
|
null,
|
||||||
function (data) {
|
function (data) {
|
||||||
if (!main.replayChecking && data) {
|
if (!main.replayChecking && data) {
|
||||||
core.plugin.startOpened.value = false;
|
ancTe.plugin.ui.startOpened.value = false;
|
||||||
core.plugin.loaded.value = false;
|
ancTe.plugin.ui.loaded.value = false;
|
||||||
}
|
}
|
||||||
if (id == 'autoSave' && data != null) {
|
if (id == 'autoSave' && data != null) {
|
||||||
core.saves.autosave.data = data;
|
core.saves.autosave.data = data;
|
||||||
@ -3017,7 +3016,7 @@ control.prototype.removeSwitch = function (x, y, floorId, name) {
|
|||||||
control.prototype.lockControl = function () {
|
control.prototype.lockControl = function () {
|
||||||
core.status.lockControl = true;
|
core.status.lockControl = true;
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.plugin.showFixed.value = false;
|
ancTe.plugin.fixed.showFixed.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -324,11 +324,6 @@ core.prototype._loadPlugin = async function () {
|
|||||||
const mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
|
const mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
|
||||||
core.plugin = {};
|
core.plugin = {};
|
||||||
// 加载插件
|
// 加载插件
|
||||||
if (main.mode === 'play') {
|
|
||||||
main.forward();
|
|
||||||
core.resetSettings();
|
|
||||||
core.plugin.showMarkedEnemy.value = true;
|
|
||||||
}
|
|
||||||
if (main.pluginUseCompress) {
|
if (main.pluginUseCompress) {
|
||||||
await main.loadScript(`project/plugin.min.js?v=${main.version}`);
|
await main.loadScript(`project/plugin.min.js?v=${main.version}`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -26,8 +26,8 @@ events.prototype.startGame = function (hard, seed, route, callback) {
|
|||||||
hard = hard || '';
|
hard = hard || '';
|
||||||
core.dom.gameGroup.style.display = 'block';
|
core.dom.gameGroup.style.display = 'block';
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.plugin.startOpened.value = false;
|
ancTe.plugin.ui.startOpened.value = false;
|
||||||
core.plugin.loaded.value = false;
|
ancTe.plugin.ui.loaded.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (main.mode != 'play') return;
|
if (main.mode != 'play') return;
|
||||||
|
@ -3108,7 +3108,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
|
|||||||
const block = blocks[i];
|
const block = blocks[i];
|
||||||
this.removeBlockByIndex(i, floorId);
|
this.removeBlockByIndex(i, floorId);
|
||||||
this._removeBlockFromMap(floorId, block);
|
this._removeBlockFromMap(floorId, block);
|
||||||
if (!main.replayChecking) core.updateShadow(true);
|
if (!main.replayChecking) ancTe.plugin.gameShadow.updateShadow(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -3271,7 +3271,7 @@ maps.prototype.setBlock = function (number, x, y, floorId, noredraw) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!main.replayChecking) core.updateShadow(true);
|
if (!main.replayChecking) ancTe.plugin.gameShadow.updateShadow(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
maps.prototype.animateSetBlock = function (
|
maps.prototype.animateSetBlock = function (
|
||||||
|
@ -4228,5 +4228,6 @@ ui.prototype.deleteAllCanvas = function () {
|
|||||||
this.deleteCanvas(function () {
|
this.deleteCanvas(function () {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
if (main.mode === 'play' && !main.replayChecking) core.initShadowCanvas();
|
if (main.mode === 'play' && !main.replayChecking && ancTe.plugin.shadow)
|
||||||
|
ancTe.plugin.shadow.initShadowCanvas();
|
||||||
};
|
};
|
||||||
|
@ -404,6 +404,10 @@ main.prototype.loadAsync = async function (mode, callback) {
|
|||||||
});
|
});
|
||||||
await core.init(coreData, callback);
|
await core.init(coreData, callback);
|
||||||
if (main.mode === 'play') main.loading.emit('coreInit');
|
if (main.mode === 'play') main.loading.emit('coreInit');
|
||||||
|
if (main.mode === 'play') {
|
||||||
|
ancTe.plugin.setting.resetSettings();
|
||||||
|
ancTe.plugin.mark.showMarkedEnemy.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
core.resize();
|
core.resize();
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.hideStatusBar(core.hasFlag('showToolbox'));
|
core.hideStatusBar(core.hasFlag('showToolbox'));
|
||||||
else core.showStatusBar();
|
else core.showStatusBar();
|
||||||
if (main.mode === 'play' && !main.replayChecking) {
|
if (main.mode === 'play' && !main.replayChecking) {
|
||||||
core.splitArea();
|
ancTe.plugin.fly.splitArea();
|
||||||
core.resetFlagSettings();
|
ancTe.plugin.setting.resetFlagSettings();
|
||||||
} else {
|
} else {
|
||||||
flags.autoSkill ??= true;
|
flags.autoSkill ??= true;
|
||||||
flags.itemDetail ??= true;
|
flags.itemDetail ??= true;
|
||||||
@ -146,8 +146,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.drawMap(floorId);
|
core.drawMap(floorId);
|
||||||
|
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.updateShadow();
|
ancTe.plugin.gameShadow.updateShadow();
|
||||||
core.setCanvasFilterByFloorId(floorId);
|
ancTe.plugin.gameCanvas.setCanvasFilterByFloorId(floorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 切换楼层BGM
|
// 切换楼层BGM
|
||||||
@ -207,7 +207,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.visitFloor(floorId);
|
core.visitFloor(floorId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!flags.debug && !main.replayChecking) core.checkVisitedFloor();
|
if (!flags.debug && !main.replayChecking)
|
||||||
|
ancTe.plugin.completion.checkVisitedFloor();
|
||||||
},
|
},
|
||||||
flyTo: function (toId, callback) {
|
flyTo: function (toId, callback) {
|
||||||
// 楼层传送器的使用,从当前楼层飞往toId
|
// 楼层传送器的使用,从当前楼层飞往toId
|
||||||
@ -1013,15 +1014,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
case 67: // C:怪物临界
|
case 67: // C:怪物临界
|
||||||
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
||||||
core.plugin.fixedDetailPanel = 'critical';
|
core.plugin.fixedDetailPanel = 'critical';
|
||||||
core.plugin.showFixed.value = false;
|
ancTe.plugin.fixed.showFixed.value = false;
|
||||||
core.plugin.fixedDetailOpened.value = true;
|
ancTe.plugin.ui.fixedDetailOpened.value = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 69: // E:怪物属性
|
case 69: // E:怪物属性
|
||||||
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
||||||
core.plugin.fixedDetailPanel = 'special';
|
core.plugin.fixedDetailPanel = 'special';
|
||||||
core.plugin.showFixed.value = false;
|
ancTe.plugin.fixed.showFixed.value = false;
|
||||||
core.plugin.fixedDetailOpened.value = true;
|
ancTe.plugin.ui.fixedDetailOpened.value = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 77: // M:快速标记
|
case 77: // M:快速标记
|
||||||
@ -1029,12 +1030,18 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
const block = blocks[`${mx},${my}`];
|
const block = blocks[`${mx},${my}`];
|
||||||
if (block.event.cls.startsWith('enemy')) {
|
if (block.event.cls.startsWith('enemy')) {
|
||||||
const name = core.material.enemys[block.event.id].name;
|
const name = core.material.enemys[block.event.id].name;
|
||||||
if (core.hasMarkedEnemy(block.event.id)) {
|
if (ancTe.plugin.mark.hasMarkedEnemy(block.event.id)) {
|
||||||
core.tip('success', `已取消标记${name}!`);
|
ancTe.plugin.utils.tip(
|
||||||
core.unmarkEnemy(block.event.id);
|
'success',
|
||||||
|
`已取消标记${name}!`
|
||||||
|
);
|
||||||
|
ancTe.plugin.mark.unmarkEnemy(block.event.id);
|
||||||
} else {
|
} else {
|
||||||
core.tip('success', `已标记${name}!`);
|
ancTe.plugin.utils.tip(
|
||||||
core.markEnemy(block.event.id);
|
'success',
|
||||||
|
`已标记${name}!`
|
||||||
|
);
|
||||||
|
ancTe.plugin.mark.checkMarkedEnemy(block.event.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1050,7 +1057,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
case 49: // 1: 断灭之刃
|
case 49: // 1: 断灭之刃
|
||||||
if (!flags.bladeOn) break;
|
if (!flags.bladeOn) break;
|
||||||
if (flags.autoSkill) {
|
if (flags.autoSkill) {
|
||||||
core.tip('error', '已开启自动切换技能!');
|
ancTe.plugin.utils.tip('error', '已开启自动切换技能!');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
core.status.route.push('key:49'); // 将按键记在录像中
|
core.status.route.push('key:49'); // 将按键记在录像中
|
||||||
@ -1077,7 +1084,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
case 51: // 3: 铸剑为盾
|
case 51: // 3: 铸剑为盾
|
||||||
if (!flags.shieldOn) break;
|
if (!flags.shieldOn) break;
|
||||||
if (flags.autoSkill) {
|
if (flags.autoSkill) {
|
||||||
core.tip('error', '已开启自动切换技能!');
|
ancTe.plugin.utils.tip('error', '已开启自动切换技能!');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
core.status.route.push('key:51'); // 将按键记在录像中
|
core.status.route.push('key:51'); // 将按键记在录像中
|
||||||
@ -1184,7 +1191,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
|
|
||||||
if (flags.onChase) {
|
if (flags.onChase) {
|
||||||
core.startChase(flags.chaseIndex);
|
ancTe.plugin.fly.startChase(flags.chaseIndex);
|
||||||
if (flags.chaseIndex === 1) {
|
if (flags.chaseIndex === 1) {
|
||||||
core.playBgm('escape.mp3', 43.5);
|
core.playBgm('escape.mp3', 43.5);
|
||||||
}
|
}
|
||||||
@ -1244,9 +1251,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
core.plugin.skillTree.getSkillLevel(11) > 0 &&
|
core.plugin.skillTree.getSkillLevel(11) > 0 &&
|
||||||
(core.status.hero.special?.num ?? []).length > 0
|
(core.status.hero.special?.num ?? []).length > 0
|
||||||
) {
|
) {
|
||||||
core.plugin.showStudiedSkill.value = true;
|
ancTe.plugin.ui.showStudiedSkill.value = true;
|
||||||
} else {
|
} else {
|
||||||
core.plugin.showStudiedSkill.value = false;
|
ancTe.plugin.ui.showStudiedSkill.value = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
moveOneStep: function (callback) {
|
moveOneStep: function (callback) {
|
||||||
|
@ -1161,21 +1161,21 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"name": "bgm查看器",
|
"name": "bgm查看器",
|
||||||
"canUseItemEffect": "true",
|
"canUseItemEffect": "true",
|
||||||
"text": "可以查看游戏内你已经听过的bgm,歌曲名格式:歌手——歌曲名。未完工。",
|
"text": "可以查看游戏内你已经听过的bgm,歌曲名格式:歌手——歌曲名。未完工。",
|
||||||
"useItemEffect": "core.tip('warn', '当前道具还未制作完成!');\n// core.plugin.bgmOpened.value = true;"
|
"useItemEffect": "ancTe.plugin.utils.tip('warn', '当前道具还未制作完成!');\n// ancTe.plugin.ui.bgmOpened.value = true;"
|
||||||
},
|
},
|
||||||
"I559": {
|
"I559": {
|
||||||
"cls": "constants",
|
"cls": "constants",
|
||||||
"name": "系统设置",
|
"name": "系统设置",
|
||||||
"canUseItemEffect": "true",
|
"canUseItemEffect": "true",
|
||||||
"text": "内含所有系统设置项",
|
"text": "内含所有系统设置项",
|
||||||
"useItemEffect": "if (!core.isReplaying()) core.plugin.settingsOpened.value = true;"
|
"useItemEffect": "if (!core.isReplaying()) ancTe.plugin.ui.settingsOpened.value = true;"
|
||||||
},
|
},
|
||||||
"I560": {
|
"I560": {
|
||||||
"cls": "constants",
|
"cls": "constants",
|
||||||
"name": "百科全书",
|
"name": "百科全书",
|
||||||
"canUseItemEffect": "true",
|
"canUseItemEffect": "true",
|
||||||
"text": "一个包含游戏中所有功能详细说明的百科全书,可以查看游戏中所有的功能",
|
"text": "一个包含游戏中所有功能详细说明的百科全书,可以查看游戏中所有的功能",
|
||||||
"useItemEffect": "if (!core.isReplaying()) core.plugin.descOpened.value = true;"
|
"useItemEffect": "if (!core.isReplaying()) ancTe.plugin.ui.descOpened.value = true;"
|
||||||
},
|
},
|
||||||
"I565": {
|
"I565": {
|
||||||
"cls": "constants",
|
"cls": "constants",
|
||||||
@ -1233,7 +1233,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
|||||||
"cls": "constants",
|
"cls": "constants",
|
||||||
"name": "成就",
|
"name": "成就",
|
||||||
"canUseItemEffect": "true",
|
"canUseItemEffect": "true",
|
||||||
"useItemEffect": "core.plugin.achievementOpened.value = true;",
|
"useItemEffect": "ancTe.plugin.ui.achievementOpened.value = true;",
|
||||||
"text": "可以查看成就"
|
"text": "可以查看成就"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -68,7 +68,7 @@ onMounted(async () => {
|
|||||||
resize();
|
resize();
|
||||||
|
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
document.addEventListener('keyup', key);
|
document.addEventListener('keyup', key);
|
||||||
});
|
});
|
||||||
onUpdated(resize);
|
onUpdated(resize);
|
||||||
|
@ -1,20 +1,43 @@
|
|||||||
import { BgmController } from './audio/bgm';
|
import { BgmController } from './audio/bgm';
|
||||||
import { SoundController } from './audio/sound';
|
import { SoundController } from './audio/sound';
|
||||||
import { readyAllResource } from './loader/load';
|
import { loading, readyAllResource } from './loader/load';
|
||||||
import { ResourceStore, ResourceType } from './loader/resource';
|
import { ResourceStore, ResourceType } from './loader/resource';
|
||||||
|
import { resolvePlugin } from './plugin';
|
||||||
|
|
||||||
declare global {
|
interface AncTePlugin {
|
||||||
interface AncTe {
|
pop: ReturnType<typeof import('../plugin/pop').default>;
|
||||||
sound: SoundController;
|
ui: ReturnType<typeof import('../plugin/uiController').default>;
|
||||||
/** 游戏资源 */
|
use: ReturnType<typeof import('../plugin/use').default>;
|
||||||
resource: ResourceStore<Exclude<ResourceType, 'zip'>>;
|
animate: ReturnType<typeof import('../plugin/animateController').default>;
|
||||||
zipResource: ResourceStore<'zip'>;
|
utils: ReturnType<typeof import('../plugin/utils').default>;
|
||||||
bgm: BgmController;
|
status: ReturnType<typeof import('../plugin/ui/statusBar').default>;
|
||||||
}
|
mark: ReturnType<typeof import('../plugin/mark').default>;
|
||||||
interface Window {
|
setting: ReturnType<typeof import('../plugin/settings').default>;
|
||||||
ancTe: AncTe;
|
chapter: ReturnType<typeof import('../plugin/ui/chapter').default>;
|
||||||
}
|
fly: ReturnType<typeof import('../plugin/ui/fly').default>;
|
||||||
const ancTe: AncTe;
|
chase: ReturnType<typeof import('../plugin/chase/chase').default>;
|
||||||
|
fixed: ReturnType<typeof import('../plugin/ui/fixed').default>;
|
||||||
|
webglUtils: ReturnType<typeof import('../plugin/webgl/utils').default>;
|
||||||
|
shadow: ReturnType<typeof import('../plugin/shadow/shadow').default>;
|
||||||
|
gameShadow: ReturnType<
|
||||||
|
typeof import('../plugin/shadow/gameShadow').default
|
||||||
|
>;
|
||||||
|
achievement: ReturnType<typeof import('../plugin/ui/achievement').default>;
|
||||||
|
completion: ReturnType<typeof import('../plugin/completion').default>;
|
||||||
|
path: ReturnType<typeof import('../plugin/fx/path').default>;
|
||||||
|
gameCanvas: ReturnType<typeof import('../plugin/fx/gameCanvas').default>;
|
||||||
|
noise: ReturnType<typeof import('../plugin/fx/noise').default>;
|
||||||
|
smooth: ReturnType<typeof import('../plugin/fx/smoothView').default>;
|
||||||
|
frag: ReturnType<typeof import('../plugin/fx/frag').default>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AncTe {
|
||||||
|
sound: SoundController;
|
||||||
|
/** 游戏资源 */
|
||||||
|
resource: ResourceStore<Exclude<ResourceType, 'zip'>>;
|
||||||
|
zipResource: ResourceStore<'zip'>;
|
||||||
|
bgm: BgmController;
|
||||||
|
plugin: AncTePlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ready() {
|
function ready() {
|
||||||
@ -22,9 +45,12 @@ function ready() {
|
|||||||
bgm: new BgmController(),
|
bgm: new BgmController(),
|
||||||
resource: new ResourceStore(),
|
resource: new ResourceStore(),
|
||||||
zipResource: new ResourceStore(),
|
zipResource: new ResourceStore(),
|
||||||
sound: new SoundController()
|
sound: new SoundController(),
|
||||||
|
// @ts-ignore
|
||||||
|
plugin: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
readyAllResource();
|
readyAllResource();
|
||||||
|
loading.once('coreInit', resolvePlugin);
|
||||||
}
|
}
|
||||||
ready();
|
ready();
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import resource from '../../data/resource.json';
|
import resource from '../../data/resource.json';
|
||||||
import { has } from '../../plugin/utils';
|
|
||||||
import { EmitableEvent, EventEmitter } from '../common/eventEmitter';
|
import { EmitableEvent, EventEmitter } from '../common/eventEmitter';
|
||||||
import { Resource, getTypeByResource } from './resource';
|
import { Resource, getTypeByResource } from './resource';
|
||||||
|
|
||||||
@ -118,7 +117,7 @@ export const loading = new GameLoading();
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Main {
|
interface Main {
|
||||||
loading: EventEmitter<GameLoadEvent>;
|
loading: GameLoading;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
main.loading = loading;
|
main.loading = loading;
|
||||||
|
62
src/core/plugin.ts
Normal file
62
src/core/plugin.ts
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
import pop from '../plugin/pop';
|
||||||
|
import ui from '../plugin/uiController';
|
||||||
|
import use from '../plugin/use';
|
||||||
|
import animate from '../plugin/animateController';
|
||||||
|
import utils from '../plugin/utils';
|
||||||
|
import status from '../plugin/ui/statusBar';
|
||||||
|
import mark from '../plugin/mark';
|
||||||
|
import setting from '../plugin/settings';
|
||||||
|
import chapter from '../plugin/ui/chapter';
|
||||||
|
import fly from '../plugin/ui/fly';
|
||||||
|
import chase from '../plugin/chase/chase';
|
||||||
|
import fixed from '../plugin/ui/fixed';
|
||||||
|
import webglUtils from '../plugin/webgl/utils';
|
||||||
|
import shadow from '../plugin/shadow/shadow';
|
||||||
|
import gameShadow from '../plugin/shadow/gameShadow';
|
||||||
|
import achievement from '../plugin/ui/achievement';
|
||||||
|
import completion, { floors } from '../plugin/completion';
|
||||||
|
import path from '../plugin/fx/path';
|
||||||
|
import gameCanvas from '../plugin/fx/gameCanvas';
|
||||||
|
import noise from '../plugin/fx/noise';
|
||||||
|
import smooth from '../plugin/fx/smoothView';
|
||||||
|
import frag from '../plugin/fx/frag';
|
||||||
|
import { AncTe } from '.';
|
||||||
|
|
||||||
|
export function resolvePlugin() {
|
||||||
|
const toForward: [keyof AncTe['plugin'], any][] = [
|
||||||
|
['pop', pop()],
|
||||||
|
['ui', ui()],
|
||||||
|
['use', use()],
|
||||||
|
['animate', animate()],
|
||||||
|
['utils', utils()],
|
||||||
|
['status', status()],
|
||||||
|
['mark', mark()],
|
||||||
|
['setting', setting()],
|
||||||
|
['chapter', chapter()],
|
||||||
|
['fly', fly()],
|
||||||
|
['chase', chase()],
|
||||||
|
['fixed', fixed()],
|
||||||
|
['webglUtils', webglUtils()],
|
||||||
|
['shadow', shadow()],
|
||||||
|
['gameShadow', gameShadow()],
|
||||||
|
['achievement', achievement()],
|
||||||
|
['completion', completion()],
|
||||||
|
['path', path()],
|
||||||
|
['gameCanvas', gameCanvas()],
|
||||||
|
['noise', noise()],
|
||||||
|
['smooth', smooth()],
|
||||||
|
['frag', frag()]
|
||||||
|
];
|
||||||
|
|
||||||
|
for (const [key, obj] of toForward) {
|
||||||
|
ancTe.plugin[key] = obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 完成度相关
|
||||||
|
Object.values(floors).forEach((v, i) => {
|
||||||
|
const from = core.floorIds.indexOf(v[0]);
|
||||||
|
const to = core.floorIds.indexOf(v[1]);
|
||||||
|
const all = core.floorIds.slice(from, to + 1);
|
||||||
|
floors[i + 1] = all;
|
||||||
|
});
|
||||||
|
}
|
@ -37,7 +37,7 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"第一章完成度达到100%"
|
"第一章完成度达到100%"
|
||||||
],
|
],
|
||||||
"progress": "${core.getChapterCompletion(1)} / 100",
|
"progress": "${ancTe.plugin.completion.getChapterCompletion(1)} / 100",
|
||||||
"percent": true,
|
"percent": true,
|
||||||
"point": 50
|
"point": 50
|
||||||
},
|
},
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"第二章完成度达到100%"
|
"第二章完成度达到100%"
|
||||||
],
|
],
|
||||||
"progress": "${core.getChapterCompletion(2)} / 100",
|
"progress": "${ancTe.plugin.completion.getChapterCompletion(2)} / 100",
|
||||||
"percent": true,
|
"percent": true,
|
||||||
"point": 50
|
"point": 50
|
||||||
},
|
},
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
import pop from './plugin/pop';
|
|
||||||
import ui from './plugin/uiController';
|
|
||||||
import use from './plugin/use';
|
|
||||||
import animate from './plugin/animateController';
|
|
||||||
import utils from './plugin/utils';
|
|
||||||
import status from './plugin/ui/statusBar';
|
|
||||||
import mark from './plugin/mark';
|
|
||||||
import setting from './plugin/settings';
|
|
||||||
import chapter from './plugin/ui/chapter';
|
|
||||||
import fly from './plugin/ui/fly';
|
|
||||||
import chase from './plugin/chase/chase';
|
|
||||||
import fixed from './plugin/ui/fixed';
|
|
||||||
import webglUtils from './plugin/webgl/utils';
|
|
||||||
import shadow from './plugin/shadow/shadow';
|
|
||||||
import gameShadow from './plugin/shadow/gameShadow';
|
|
||||||
import achievement from './plugin/ui/achievement';
|
|
||||||
import completion, { floors } from './plugin/completion';
|
|
||||||
import path from './plugin/fx/path';
|
|
||||||
import gameCanvas from './plugin/fx/gameCanvas';
|
|
||||||
import noise from './plugin/fx/noise';
|
|
||||||
import smooth from './plugin/fx/smoothView';
|
|
||||||
import frag from './plugin/fx/frag';
|
|
||||||
|
|
||||||
function forward() {
|
|
||||||
const toForward: any[] = [
|
|
||||||
pop(),
|
|
||||||
ui(),
|
|
||||||
use(),
|
|
||||||
animate(),
|
|
||||||
utils(),
|
|
||||||
status(),
|
|
||||||
mark(),
|
|
||||||
setting(),
|
|
||||||
chapter(),
|
|
||||||
fly(),
|
|
||||||
chase(),
|
|
||||||
fixed(),
|
|
||||||
webglUtils(),
|
|
||||||
shadow(),
|
|
||||||
gameShadow(),
|
|
||||||
achievement(),
|
|
||||||
completion(),
|
|
||||||
path(),
|
|
||||||
gameCanvas(),
|
|
||||||
noise(),
|
|
||||||
smooth(),
|
|
||||||
frag()
|
|
||||||
];
|
|
||||||
|
|
||||||
// 初始化所有插件,并转发到core上
|
|
||||||
for (const data of toForward) {
|
|
||||||
for (const name in data) {
|
|
||||||
const d = data[name as keyof typeof data];
|
|
||||||
if (!(name in core.plugin)) {
|
|
||||||
// @ts-ignore
|
|
||||||
core.plugin[name as keyof PluginDeclaration] = d;
|
|
||||||
}
|
|
||||||
if (!(d instanceof Function)) continue;
|
|
||||||
if (name in core) continue;
|
|
||||||
if (name.startsWith('_')) continue;
|
|
||||||
// @ts-ignore
|
|
||||||
core[name as ForwardKeys<PluginDeclaration>] = d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('插件转发完成!');
|
|
||||||
|
|
||||||
Object.values(floors).forEach((v, i) => {
|
|
||||||
const from = core.floorIds.indexOf(v[0]);
|
|
||||||
const to = core.floorIds.indexOf(v[1]);
|
|
||||||
const all = core.floorIds.slice(from, to + 1);
|
|
||||||
floors[i + 1] = all;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
main.forward = forward;
|
|
||||||
main.init('play');
|
|
||||||
main.listen();
|
|
@ -3,8 +3,10 @@ import App from './App.vue';
|
|||||||
import App2 from './App2.vue';
|
import App2 from './App2.vue';
|
||||||
import './styles.less';
|
import './styles.less';
|
||||||
import 'ant-design-vue/dist/antd.dark.css';
|
import 'ant-design-vue/dist/antd.dark.css';
|
||||||
import './initPlugin';
|
|
||||||
import './core/index';
|
import './core/index';
|
||||||
|
|
||||||
createApp(App).mount('#root');
|
createApp(App).mount('#root');
|
||||||
createApp(App2).mount('#root2');
|
createApp(App2).mount('#root2');
|
||||||
|
|
||||||
|
main.init('play');
|
||||||
|
main.listen();
|
||||||
|
@ -191,7 +191,7 @@ core.events.afterBattle = function (
|
|||||||
canvas.width = 32;
|
canvas.width = 32;
|
||||||
canvas.height = 32;
|
canvas.height = 32;
|
||||||
core.drawIcon(canvas, enemy.id, 0, 0, 32, 32, frame);
|
core.drawIcon(canvas, enemy.id, 0, 0, 32, 32, frame);
|
||||||
const manager = core.applyFragWith(canvas);
|
const manager = ancTe.plugin.frag.applyFragWith(canvas);
|
||||||
const frag = manager.canvas;
|
const frag = manager.canvas;
|
||||||
frag.style.imageRendering = 'pixelated';
|
frag.style.imageRendering = 'pixelated';
|
||||||
frag.style.width = `${frag.width * core.domStyle.scale}px`;
|
frag.style.width = `${frag.width * core.domStyle.scale}px`;
|
||||||
|
@ -10,7 +10,7 @@ control.prototype.checkBlock = function (forceMockery: boolean = false) {
|
|||||||
const damage = info?.damage;
|
const damage = info?.damage;
|
||||||
if (damage) {
|
if (damage) {
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.addPop(
|
ancTe.plugin.pop.addPop(
|
||||||
(x - core.bigmap.offsetX / 32) * 32 + 12,
|
(x - core.bigmap.offsetX / 32) * 32 + 12,
|
||||||
(y - core.bigmap.offsetY / 32) * 32 + 20,
|
(y - core.bigmap.offsetY / 32) * 32 + 20,
|
||||||
(-damage).toString()
|
(-damage).toString()
|
||||||
|
@ -36,7 +36,7 @@ export function removeMaps(fromId, toId, force) {
|
|||||||
deleted = true;
|
deleted = true;
|
||||||
}
|
}
|
||||||
if (deleted && !main.replayChecking) {
|
if (deleted && !main.replayChecking) {
|
||||||
core.splitArea();
|
ancTe.plugin.fly.splitArea();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ export function getSkillConsume(skill) {
|
|||||||
|
|
||||||
export function openTree() {
|
export function openTree() {
|
||||||
if (main.replayChecking) return;
|
if (main.replayChecking) return;
|
||||||
core.plugin.skillTreeOpened.value = true;
|
ancTe.plugin.ui.skillTreeOpened.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ export function studySkill(enemy: any, number: number) {
|
|||||||
if (special instanceof Function) special = special(enemy);
|
if (special instanceof Function) special = special(enemy);
|
||||||
if (!canStudySkill(number)) {
|
if (!canStudySkill(number)) {
|
||||||
if (!main.replayChecking) {
|
if (!main.replayChecking) {
|
||||||
core.tip('error', `无法学习${special}`);
|
ancTe.plugin.utils.tip('error', `无法学习${special}`);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,11 @@ function intelligentArrow(fromSelf) {
|
|||||||
damaged[loc + direction] = true;
|
damaged[loc + direction] = true;
|
||||||
core.drawHeroAnimate('hand');
|
core.drawHeroAnimate('hand');
|
||||||
core.status.hero.hp -= 1000;
|
core.status.hero.hp -= 1000;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
|
ancTe.plugin.pop.addPop(
|
||||||
|
x * 32 + 16,
|
||||||
|
y * 32 + 16,
|
||||||
|
-1000
|
||||||
|
);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
clearInterval(skill1);
|
clearInterval(skill1);
|
||||||
@ -511,7 +515,11 @@ function intelligentArrow(fromSelf) {
|
|||||||
damaged[loc + direction] = true;
|
damaged[loc + direction] = true;
|
||||||
core.drawHeroAnimate('hand');
|
core.drawHeroAnimate('hand');
|
||||||
core.status.hero.hp -= 1000;
|
core.status.hero.hp -= 1000;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
|
ancTe.plugin.pop.addPop(
|
||||||
|
x * 32 + 16,
|
||||||
|
y * 32 + 16,
|
||||||
|
-1000
|
||||||
|
);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
clearInterval(skill1);
|
clearInterval(skill1);
|
||||||
@ -637,7 +645,7 @@ function icyMomentem() {
|
|||||||
if (x == locs[index][0] && y == locs[index][1]) {
|
if (x == locs[index][0] && y == locs[index][1]) {
|
||||||
core.drawHeroAnimate('hand');
|
core.drawHeroAnimate('hand');
|
||||||
core.status.hero.hp -= 5000;
|
core.status.hero.hp -= 5000;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -5000);
|
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -5000);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
core.status.hero.hp = 0;
|
core.status.hero.hp = 0;
|
||||||
@ -812,7 +820,7 @@ function getThunderDamage(x, y, power) {
|
|||||||
hy = core.status.hero.loc.y;
|
hy = core.status.hero.loc.y;
|
||||||
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
|
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
|
||||||
core.status.hero.hp -= 3000 * power;
|
core.status.hero.hp -= 3000 * power;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
|
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
core.status.hero.hp = 0;
|
core.status.hero.hp = 0;
|
||||||
@ -976,7 +984,11 @@ function ballThunder() {
|
|||||||
) {
|
) {
|
||||||
damaged[i] = true;
|
damaged[i] = true;
|
||||||
core.status.hero.hp -= 3000;
|
core.status.hero.hp -= 3000;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -3000);
|
ancTe.plugin.pop.addPop(
|
||||||
|
x * 32 + 16,
|
||||||
|
y * 32 + 16,
|
||||||
|
-3000
|
||||||
|
);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
core.playSound('electron.mp3');
|
core.playSound('electron.mp3');
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
@ -1482,7 +1494,7 @@ function boomingAnimate() {
|
|||||||
hy = core.status.hero.loc.y;
|
hy = core.status.hero.loc.y;
|
||||||
if (loc[0] == hx && loc[1] == hy) {
|
if (loc[0] == hx && loc[1] == hy) {
|
||||||
core.status.hero.hp -= 3000;
|
core.status.hero.hp -= 3000;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -3000);
|
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
core.status.hero.hp = 0;
|
core.status.hero.hp = 0;
|
||||||
@ -1521,7 +1533,7 @@ function lineDamage(x1, y1, x2, y2, damage) {
|
|||||||
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
|
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
|
||||||
if (n1 * n2 <= 0) {
|
if (n1 * n2 <= 0) {
|
||||||
core.status.hero.hp -= damage;
|
core.status.hero.hp -= damage;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
|
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
core.playSound('electron.mp3');
|
core.playSound('electron.mp3');
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
@ -1541,7 +1553,7 @@ function lineDamage(x1, y1, x2, y2, damage) {
|
|||||||
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
|
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
|
||||||
if (n1 * n2 <= 0) {
|
if (n1 * n2 <= 0) {
|
||||||
core.status.hero.hp -= damage;
|
core.status.hero.hp -= damage;
|
||||||
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
|
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
core.playSound('electron.mp3');
|
core.playSound('electron.mp3');
|
||||||
if (core.status.hero.hp < 0) {
|
if (core.status.hero.hp < 0) {
|
||||||
|
@ -12,30 +12,34 @@ export {};
|
|||||||
function openItemShop(itemShopId) {
|
function openItemShop(itemShopId) {
|
||||||
if (!core.isReplaying()) {
|
if (!core.isReplaying()) {
|
||||||
core.plugin.openedShopId = itemShopId;
|
core.plugin.openedShopId = itemShopId;
|
||||||
core.plugin.shopOpened.value = true;
|
ancTe.plugin.ui.shopOpened.value = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateVueStatusBar() {
|
function updateVueStatusBar() {
|
||||||
if (main.replayChecking) return;
|
if (main.replayChecking) return;
|
||||||
core.plugin.statusBarStatus.value = !core.plugin.statusBarStatus.value;
|
core.plugin.statusBarStatus.value = !core.plugin.statusBarStatus.value;
|
||||||
core.checkMarkedEnemy();
|
ancTe.plugin.mark.checkMarkedEnemy();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.prototype.drawBook = function () {
|
ui.prototype.drawBook = function () {
|
||||||
if (!core.isReplaying()) return (core.plugin.bookOpened.value = true);
|
if (!core.isReplaying())
|
||||||
|
return (ancTe.plugin.ui.bookOpened.value = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
ui.prototype._drawToolbox = function () {
|
ui.prototype._drawToolbox = function () {
|
||||||
if (!core.isReplaying()) return (core.plugin.toolOpened.value = true);
|
if (!core.isReplaying())
|
||||||
|
return (ancTe.plugin.ui.toolOpened.value = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
ui.prototype._drawEquipbox = function () {
|
ui.prototype._drawEquipbox = function () {
|
||||||
if (!core.isReplaying()) return (core.plugin.equipOpened.value = true);
|
if (!core.isReplaying())
|
||||||
|
return (ancTe.plugin.ui.equipOpened.value = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
ui.prototype.drawFly = function () {
|
ui.prototype.drawFly = function () {
|
||||||
if (!core.isReplaying()) return (core.plugin.flyOpened.value = true);
|
if (!core.isReplaying())
|
||||||
|
return (ancTe.plugin.ui.flyOpened.value = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
control.prototype.updateStatusBar_update = function () {
|
control.prototype.updateStatusBar_update = function () {
|
||||||
@ -53,7 +57,7 @@ export {};
|
|||||||
control.prototype.showStatusBar = function () {
|
control.prototype.showStatusBar = function () {
|
||||||
if (main.mode == 'editor') return;
|
if (main.mode == 'editor') return;
|
||||||
core.removeFlag('hideStatusBar');
|
core.removeFlag('hideStatusBar');
|
||||||
core.plugin.showStatusBar.value = true;
|
ancTe.plugin.ui.showStatusBar.value = true;
|
||||||
core.dom.tools.hard.style.display = 'block';
|
core.dom.tools.hard.style.display = 'block';
|
||||||
core.dom.toolBar.style.display = 'block';
|
core.dom.toolBar.style.display = 'block';
|
||||||
};
|
};
|
||||||
@ -64,7 +68,7 @@ export {};
|
|||||||
// 如果原本就是隐藏的,则先显示
|
// 如果原本就是隐藏的,则先显示
|
||||||
if (!core.domStyle.showStatusBar) this.showStatusBar();
|
if (!core.domStyle.showStatusBar) this.showStatusBar();
|
||||||
if (core.isReplaying()) showToolbox = true;
|
if (core.isReplaying()) showToolbox = true;
|
||||||
core.plugin.showStatusBar.value = false;
|
ancTe.plugin.ui.showStatusBar.value = false;
|
||||||
|
|
||||||
var toolItems = core.dom.tools;
|
var toolItems = core.dom.tools;
|
||||||
core.setFlag('hideStatusBar', true);
|
core.setFlag('hideStatusBar', true);
|
||||||
@ -83,13 +87,13 @@ export {};
|
|||||||
|
|
||||||
function showChapter(chapter) {
|
function showChapter(chapter) {
|
||||||
if (core.isReplaying()) return;
|
if (core.isReplaying()) return;
|
||||||
core.plugin.chapterContent.value = chapter;
|
ancTe.plugin.chapter.chapterContent.value = chapter;
|
||||||
core.plugin.chapterShowed.value = true;
|
ancTe.plugin.chapter.chapterShowed.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function openSkill() {
|
function openSkill() {
|
||||||
if (core.isReplaying()) return;
|
if (core.isReplaying()) return;
|
||||||
core.plugin.skillOpened.value = true;
|
ancTe.plugin.ui.skillOpened.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
core.plugin.gameUi = {
|
core.plugin.gameUi = {
|
||||||
|
@ -33,7 +33,7 @@ export const antiAliasing = ref(true);
|
|||||||
export const fullscreen = ref(false);
|
export const fullscreen = ref(false);
|
||||||
|
|
||||||
watch(transition, n => {
|
watch(transition, n => {
|
||||||
core.plugin.transition.value = n;
|
ancTe.plugin.ui.transition.value = n;
|
||||||
core.setLocalStorage('transition', n);
|
core.setLocalStorage('transition', n);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ watch(antiAliasing, n => {
|
|||||||
function reset() {
|
function reset() {
|
||||||
const t = core.getLocalStorage('transition', false);
|
const t = core.getLocalStorage('transition', false);
|
||||||
transition.value = t;
|
transition.value = t;
|
||||||
core.plugin.transition.value = transition.value;
|
ancTe.plugin.ui.transition.value = transition.value;
|
||||||
autoScale.value = core.getLocalStorage('autoScale', true);
|
autoScale.value = core.getLocalStorage('autoScale', true);
|
||||||
showStudied.value = core.getLocalStorage('showStudied', true);
|
showStudied.value = core.getLocalStorage('showStudied', true);
|
||||||
showHalo.value = core.getLocalStorage('showHalo', true);
|
showHalo.value = core.getLocalStorage('showHalo', true);
|
||||||
|
@ -13,6 +13,8 @@ import Shop from '../ui/shop.vue';
|
|||||||
import Achievement from '../ui/achievement.vue';
|
import Achievement from '../ui/achievement.vue';
|
||||||
import Bgm from '../ui/bgmList.vue';
|
import Bgm from '../ui/bgmList.vue';
|
||||||
|
|
||||||
|
// todo: 优化开启控制器
|
||||||
|
|
||||||
export const bookOpened = ref(false);
|
export const bookOpened = ref(false);
|
||||||
export const toolOpened = ref(false);
|
export const toolOpened = ref(false);
|
||||||
export const equipOpened = ref(false);
|
export const equipOpened = ref(false);
|
||||||
@ -25,23 +27,15 @@ export const flyOpened = ref(false);
|
|||||||
export const showStudiedSkill = ref(false);
|
export const showStudiedSkill = ref(false);
|
||||||
export const fixedDetailOpened = ref(false);
|
export const fixedDetailOpened = ref(false);
|
||||||
export const shopOpened = ref(false);
|
export const shopOpened = ref(false);
|
||||||
export const startOpened = ref(false);
|
export const startOpened = ref(true);
|
||||||
export const achievementOpened = ref(false);
|
export const achievementOpened = ref(false);
|
||||||
export const bgmOpened = ref(false);
|
export const bgmOpened = ref(false);
|
||||||
|
|
||||||
export const transition = ref(true);
|
export const transition = ref(true);
|
||||||
export const noClosePanel = ref(false);
|
export const noClosePanel = ref(false);
|
||||||
|
|
||||||
export const loaded = ref(false);
|
|
||||||
export const startAnimationEnded = ref(false);
|
export const startAnimationEnded = ref(false);
|
||||||
|
|
||||||
watch(loaded, n => {
|
|
||||||
if (n && startAnimationEnded.value) startOpened.value = true;
|
|
||||||
});
|
|
||||||
watch(startAnimationEnded, n => {
|
|
||||||
if (n && loaded.value) startOpened.value = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
let app: HTMLDivElement;
|
let app: HTMLDivElement;
|
||||||
|
|
||||||
/** ui声明列表 */
|
/** ui声明列表 */
|
||||||
@ -98,7 +92,6 @@ export default function init() {
|
|||||||
shopOpened,
|
shopOpened,
|
||||||
startOpened,
|
startOpened,
|
||||||
startAnimationEnded,
|
startAnimationEnded,
|
||||||
loaded,
|
|
||||||
achievementOpened,
|
achievementOpened,
|
||||||
bgmOpened
|
bgmOpened
|
||||||
};
|
};
|
||||||
|
5
src/types/plugin.d.ts
vendored
5
src/types/plugin.d.ts
vendored
@ -475,3 +475,8 @@ type Forward<T> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type ForwardKeys<T> = keyof Forward<T>;
|
type ForwardKeys<T> = keyof Forward<T>;
|
||||||
|
|
||||||
|
declare const ancTe: import('../core/index').AncTe;
|
||||||
|
interface Window {
|
||||||
|
ancTe: import('../core/index').AncTe;
|
||||||
|
}
|
||||||
|
@ -51,7 +51,7 @@ const content = computed(() => {
|
|||||||
const name = computed(() => list[selected.value]!.name);
|
const name = computed(() => list[selected.value]!.name);
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.bgmOpened.value = false;
|
ancTe.plugin.ui.bgmOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function select(id: BgmIds) {
|
function select(id: BgmIds) {
|
||||||
|
@ -166,8 +166,8 @@ async function show() {
|
|||||||
*/
|
*/
|
||||||
async function exit() {
|
async function exit() {
|
||||||
noClosePanel.value = true;
|
noClosePanel.value = true;
|
||||||
core.plugin.bookOpened.value = false;
|
ancTe.plugin.ui.bookOpened.value = false;
|
||||||
if (core.plugin.transition.value) await sleep(650);
|
if (ancTe.plugin.ui.transition.value) await sleep(650);
|
||||||
else await sleep(100);
|
else await sleep(100);
|
||||||
if (core.events.recoverEvents(core.status.event.interval)) {
|
if (core.events.recoverEvents(core.status.event.interval)) {
|
||||||
return;
|
return;
|
||||||
@ -244,7 +244,7 @@ function keydown(e: KeyboardEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
else await sleep(50);
|
else await sleep(50);
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
document.addEventListener('keydown', keydown);
|
document.addEventListener('keydown', keydown);
|
||||||
|
@ -28,7 +28,7 @@ type DescKey = keyof typeof desc;
|
|||||||
const selected = ref(Object.keys(desc)[0] as DescKey);
|
const selected = ref(Object.keys(desc)[0] as DescKey);
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.descOpened.value = false;
|
ancTe.plugin.ui.descOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const content = computed(() => {
|
const content = computed(() => {
|
||||||
|
@ -311,7 +311,7 @@ function changeSort() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.equipOpened.value = false;
|
ancTe.plugin.ui.equipOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickList(i: number) {
|
function clickList(i: number) {
|
||||||
@ -429,12 +429,12 @@ function dragout(e: Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function toTool() {
|
async function toTool() {
|
||||||
const before = core.plugin.transition.value;
|
const before = ancTe.plugin.ui.transition.value;
|
||||||
core.plugin.transition.value = false;
|
ancTe.plugin.ui.transition.value = false;
|
||||||
exit();
|
exit();
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
core.plugin.toolOpened.value = true;
|
ancTe.plugin.ui.toolOpened.value = true;
|
||||||
core.plugin.transition.value = before;
|
ancTe.plugin.ui.transition.value = before;
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyup(e: KeyboardEvent) {
|
function keyup(e: KeyboardEvent) {
|
||||||
@ -455,7 +455,7 @@ watch(toShow, n => {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
bind();
|
bind();
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
else await sleep(50);
|
else await sleep(50);
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
});
|
});
|
||||||
|
@ -84,7 +84,7 @@ async function calHeight() {
|
|||||||
vw = window.innerWidth;
|
vw = window.innerWidth;
|
||||||
width.value = vh * 0.28;
|
width.value = vh * 0.28;
|
||||||
await new Promise(res => requestAnimationFrame(res));
|
await new Promise(res => requestAnimationFrame(res));
|
||||||
if (core.plugin.fixedDetailOpened.value) {
|
if (ancTe.plugin.ui.fixedDetailOpened.value) {
|
||||||
showFixed.value = false;
|
showFixed.value = false;
|
||||||
}
|
}
|
||||||
updateMain();
|
updateMain();
|
||||||
|
@ -30,7 +30,7 @@ if (e && core.getClsFromId(e)?.startsWith('enemy')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
core.plugin.fixedDetailOpened.value = false;
|
ancTe.plugin.ui.fixedDetailOpened.value = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ let thumbCtx: CanvasRenderingContext2D;
|
|||||||
let downloadMode = false;
|
let downloadMode = false;
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.flyOpened.value = false;
|
ancTe.plugin.ui.flyOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
@ -610,7 +610,7 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
|
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
map.addEventListener('touchstart', touchdown);
|
map.addEventListener('touchstart', touchdown);
|
||||||
|
@ -137,7 +137,7 @@ const settings: Record<keyof Settings, Ref<boolean>> = {
|
|||||||
const ignore: (keyof Settings)[] = ['fullscreen'];
|
const ignore: (keyof Settings)[] = ['fullscreen'];
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.settingsOpened.value = false;
|
ancTe.plugin.ui.settingsOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function click(id: keyof Settings) {
|
function click(id: keyof Settings) {
|
||||||
|
@ -303,12 +303,12 @@ function keydown(e: KeyboardEvent) {
|
|||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
if (bought) core.status.route.push('closeShop');
|
if (bought) core.status.route.push('closeShop');
|
||||||
core.plugin.shopOpened.value = false;
|
ancTe.plugin.ui.shopOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
document.addEventListener('keydown', keydown);
|
document.addEventListener('keydown', keydown);
|
||||||
core.status.route.push(`openShop:${id}`);
|
core.status.route.push(`openShop:${id}`);
|
||||||
|
@ -60,7 +60,7 @@ const content = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.skillOpened.value = false;
|
ancTe.plugin.ui.skillOpened.value = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ const level = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.skillTreeOpened.value = false;
|
ancTe.plugin.ui.skillTreeOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
@ -274,7 +274,7 @@ onMounted(async () => {
|
|||||||
draw();
|
draw();
|
||||||
|
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
canvas.addEventListener('click', click);
|
canvas.addEventListener('click', click);
|
||||||
document.addEventListener('keyup', key);
|
document.addEventListener('keyup', key);
|
||||||
});
|
});
|
||||||
|
@ -69,6 +69,7 @@ import { doByInterval, keycode } from '../plugin/utils';
|
|||||||
import { KeyCode } from '../plugin/keyCodes';
|
import { KeyCode } from '../plugin/keyCodes';
|
||||||
import { achievementOpened } from '../plugin/uiController';
|
import { achievementOpened } from '../plugin/uiController';
|
||||||
import { triggerFullscreen } from '../plugin/settings';
|
import { triggerFullscreen } from '../plugin/settings';
|
||||||
|
import { loading } from '../core/loader/load';
|
||||||
|
|
||||||
let startdiv: HTMLDivElement;
|
let startdiv: HTMLDivElement;
|
||||||
let start: HTMLDivElement;
|
let start: HTMLDivElement;
|
||||||
@ -96,6 +97,7 @@ const toshow = reactive<string[]>([]);
|
|||||||
const selected = ref('start-game');
|
const selected = ref('start-game');
|
||||||
|
|
||||||
function resize() {
|
function resize() {
|
||||||
|
if (!window.core) return;
|
||||||
const scale = core.domStyle.scale;
|
const scale = core.domStyle.scale;
|
||||||
const h = core._PY_;
|
const h = core._PY_;
|
||||||
const height = h * scale;
|
const height = h * scale;
|
||||||
@ -290,34 +292,34 @@ async function setButtonAnimate() {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
cursor = document.getElementById('cursor')!;
|
cursor = document.getElementById('cursor')!;
|
||||||
played = core.getLocalStorage('oneweek1', false);
|
|
||||||
startdiv = document.getElementById('start-div') as HTMLDivElement;
|
startdiv = document.getElementById('start-div') as HTMLDivElement;
|
||||||
main = document.getElementById('start-main') as HTMLDivElement;
|
main = document.getElementById('start-main') as HTMLDivElement;
|
||||||
start = document.getElementById('start') as HTMLDivElement;
|
start = document.getElementById('start') as HTMLDivElement;
|
||||||
background = document.getElementById('background') as HTMLImageElement;
|
background = document.getElementById('background') as HTMLImageElement;
|
||||||
|
|
||||||
core.registerResize('start', resize);
|
loading.once('coreInit', async () => {
|
||||||
resize();
|
window.addEventListener('resize', resize);
|
||||||
|
resize();
|
||||||
|
|
||||||
soundChecked.value = core.musicStatus.bgmStatus;
|
soundChecked.value = core.musicStatus.bgmStatus;
|
||||||
|
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
document.addEventListener('keydown', keydown);
|
document.addEventListener('keydown', keydown);
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
start.style.opacity = '1';
|
start.style.opacity = '1';
|
||||||
if (played) {
|
if (played) {
|
||||||
text.value = text2;
|
text.value = text2;
|
||||||
hard.splice(1, 0, '挑战');
|
hard.splice(1, 0, '挑战');
|
||||||
}
|
}
|
||||||
setButtonAnimate().then(() => (showed.value = true));
|
setButtonAnimate().then(() => (showed.value = true));
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
showCursor();
|
showCursor();
|
||||||
await sleep(1200);
|
await sleep(1200);
|
||||||
core.dom.startPanel.style.display = 'none';
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
core.unregisterResize('start');
|
window.removeEventListener('resize', resize);
|
||||||
document.removeEventListener('keydown', keydown);
|
document.removeEventListener('keydown', keydown);
|
||||||
document.removeEventListener('keyup', keyup);
|
document.removeEventListener('keyup', keyup);
|
||||||
});
|
});
|
||||||
|
@ -165,19 +165,19 @@ async function select(id: ShowItemIds, nouse: boolean = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exit() {
|
function exit() {
|
||||||
core.plugin.toolOpened.value = false;
|
ancTe.plugin.ui.toolOpened.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function use(id: ShowItemIds) {
|
async function use(id: ShowItemIds) {
|
||||||
if (id === 'none') return;
|
if (id === 'none') return;
|
||||||
if (core.canUseItem(id)) {
|
if (core.canUseItem(id)) {
|
||||||
// 应该暂时把动画去掉
|
// 应该暂时把动画去掉
|
||||||
const before = core.plugin.transition.value;
|
const before = ancTe.plugin.ui.transition.value;
|
||||||
core.plugin.transition.value = false;
|
ancTe.plugin.ui.transition.value = false;
|
||||||
exit();
|
exit();
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
core.useItem(id);
|
core.useItem(id);
|
||||||
core.plugin.transition.value = before;
|
ancTe.plugin.ui.transition.value = before;
|
||||||
} else {
|
} else {
|
||||||
message.warn({
|
message.warn({
|
||||||
content: '当前无法使用该道具!',
|
content: '当前无法使用该道具!',
|
||||||
@ -187,12 +187,12 @@ async function use(id: ShowItemIds) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function toEquip() {
|
async function toEquip() {
|
||||||
const before = core.plugin.transition.value;
|
const before = ancTe.plugin.ui.transition.value;
|
||||||
core.plugin.transition.value = false;
|
ancTe.plugin.ui.transition.value = false;
|
||||||
exit();
|
exit();
|
||||||
await sleep(50);
|
await sleep(50);
|
||||||
core.plugin.equipOpened.value = true;
|
ancTe.plugin.ui.equipOpened.value = true;
|
||||||
core.plugin.transition.value = before;
|
ancTe.plugin.ui.transition.value = before;
|
||||||
}
|
}
|
||||||
|
|
||||||
function keyup(e: KeyboardEvent) {
|
function keyup(e: KeyboardEvent) {
|
||||||
@ -239,7 +239,7 @@ function keydown(e: KeyboardEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (core.plugin.transition.value) await sleep(600);
|
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||||
else await sleep(50);
|
else await sleep(50);
|
||||||
document.addEventListener('keyup', keyup);
|
document.addEventListener('keyup', keyup);
|
||||||
document.addEventListener('keydown', keydown);
|
document.addEventListener('keydown', keydown);
|
||||||
|
Loading…
Reference in New Issue
Block a user