mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-31 15:09:26 +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 粒子特效
|
||||
[] 单独的工具栏
|
||||
[] 完全 ts 化
|
||||
|
48
index.html
48
index.html
@ -24,30 +24,30 @@
|
||||
<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 () {
|
||||
if (window.core && core.plugin && core.plugin.startAnimationEnded) {
|
||||
core.plugin.startAnimationEnded.value = true;
|
||||
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";
|
||||
})();
|
||||
// (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 () {
|
||||
// if (window.core && core.plugin && ancTe.plugin.ui.startAnimationEnded) {
|
||||
// ancTe.plugin.ui.startAnimationEnded.value = true;
|
||||
// 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>
|
||||
<div id="game">
|
||||
<!-- injection -->
|
||||
|
@ -22,7 +22,7 @@
|
||||
"jszip": "^3.10.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lz-string": "^1.5.0",
|
||||
"mutate-animate": "^1.2.3",
|
||||
"mutate-animate": "^1.3.1",
|
||||
"three": "^0.149.0",
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
@ -51,7 +51,7 @@
|
||||
"form-data": "^4.0.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"less": "^4.1.3",
|
||||
"rollup": "^3.26.3",
|
||||
"rollup": "^3.27.0",
|
||||
"terser": "^5.19.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.1.6",
|
||||
|
124
pnpm-lock.yaml
124
pnpm-lock.yaml
@ -27,8 +27,8 @@ dependencies:
|
||||
specifier: ^1.5.0
|
||||
version: 1.5.0
|
||||
mutate-animate:
|
||||
specifier: ^1.2.3
|
||||
version: 1.2.3
|
||||
specifier: ^1.3.1
|
||||
version: 1.3.1
|
||||
three:
|
||||
specifier: ^0.149.0
|
||||
version: 0.149.0
|
||||
@ -48,22 +48,22 @@ devDependencies:
|
||||
version: 7.22.9(@babel/core@7.22.9)
|
||||
'@rollup/plugin-babel':
|
||||
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':
|
||||
specifier: ^25.0.3
|
||||
version: 25.0.3(rollup@3.26.3)
|
||||
version: 25.0.3(rollup@3.27.0)
|
||||
'@rollup/plugin-node-resolve':
|
||||
specifier: ^15.1.0
|
||||
version: 15.1.0(rollup@3.26.3)
|
||||
version: 15.1.0(rollup@3.27.0)
|
||||
'@rollup/plugin-replace':
|
||||
specifier: ^5.0.2
|
||||
version: 5.0.2(rollup@3.26.3)
|
||||
version: 5.0.2(rollup@3.27.0)
|
||||
'@rollup/plugin-terser':
|
||||
specifier: ^0.4.3
|
||||
version: 0.4.3(rollup@3.26.3)
|
||||
version: 0.4.3(rollup@3.27.0)
|
||||
'@rollup/plugin-typescript':
|
||||
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':
|
||||
specifier: ^7.20.1
|
||||
version: 7.20.1
|
||||
@ -110,8 +110,8 @@ devDependencies:
|
||||
specifier: ^4.1.3
|
||||
version: 4.1.3
|
||||
rollup:
|
||||
specifier: ^3.26.3
|
||||
version: 3.26.3
|
||||
specifier: ^3.27.0
|
||||
version: 3.27.0
|
||||
terser:
|
||||
specifier: ^5.19.2
|
||||
version: 5.19.2
|
||||
@ -123,7 +123,7 @@ devDependencies:
|
||||
version: 5.1.6
|
||||
unplugin-vue-components:
|
||||
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:
|
||||
specifier: ^4.4.7
|
||||
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/core': 7.22.9
|
||||
'@babel/helper-validator-option': 7.22.5
|
||||
browserslist: 4.21.9
|
||||
browserslist: 4.21.10
|
||||
lru-cache: 5.1.1
|
||||
semver: 6.3.1
|
||||
dev: true
|
||||
@ -1711,7 +1711,7 @@ packages:
|
||||
dev: 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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1726,12 +1726,12 @@ packages:
|
||||
dependencies:
|
||||
'@babel/core': 7.22.9
|
||||
'@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
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1740,16 +1740,16 @@ packages:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||
commondir: 1.0.1
|
||||
estree-walker: 2.0.2
|
||||
glob: 8.1.0
|
||||
is-reference: 1.2.1
|
||||
magic-string: 0.27.0
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1758,16 +1758,16 @@ packages:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||
'@types/resolve': 1.20.2
|
||||
deepmerge: 4.3.1
|
||||
is-builtin-module: 3.2.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.2
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1776,12 +1776,12 @@ packages:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||
magic-string: 0.27.0
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1790,13 +1790,13 @@ packages:
|
||||
rollup:
|
||||
optional: true
|
||||
dependencies:
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
serialize-javascript: 6.0.1
|
||||
smob: 1.4.0
|
||||
terser: 5.19.2
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1809,13 +1809,13 @@ packages:
|
||||
tslib:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
|
||||
'@rollup/pluginutils': 5.0.2(rollup@3.27.0)
|
||||
resolve: 1.22.2
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
typescript: 5.1.6
|
||||
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==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@ -1827,7 +1827,7 @@ packages:
|
||||
'@types/estree': 1.0.1
|
||||
estree-walker: 2.0.2
|
||||
picomatch: 2.3.1
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
dev: true
|
||||
|
||||
/@simonwep/pickr@1.8.2:
|
||||
@ -1944,9 +1944,9 @@ packages:
|
||||
dependencies:
|
||||
'@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
|
||||
magic-string: 0.30.1
|
||||
magic-string: 0.30.2
|
||||
regenerator-runtime: 0.13.11
|
||||
systemjs: 6.14.1
|
||||
terser: 5.19.2
|
||||
@ -2047,7 +2047,7 @@ packages:
|
||||
'@vue/reactivity-transform': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.1
|
||||
magic-string: 0.30.2
|
||||
postcss: 8.4.27
|
||||
source-map-js: 1.0.2
|
||||
|
||||
@ -2083,7 +2083,7 @@ packages:
|
||||
'@vue/compiler-core': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.1
|
||||
magic-string: 0.30.2
|
||||
|
||||
/@vue/reactivity@3.3.4:
|
||||
resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==}
|
||||
@ -2366,15 +2366,15 @@ packages:
|
||||
fill-range: 7.0.1
|
||||
dev: true
|
||||
|
||||
/browserslist@4.21.9:
|
||||
resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==}
|
||||
/browserslist@4.21.10:
|
||||
resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==}
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001517
|
||||
electron-to-chromium: 1.4.475
|
||||
caniuse-lite: 1.0.30001518
|
||||
electron-to-chromium: 1.4.478
|
||||
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
|
||||
|
||||
/buffer-alloc-unsafe@1.1.0:
|
||||
@ -2467,8 +2467,8 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/caniuse-lite@1.0.30001517:
|
||||
resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==}
|
||||
/caniuse-lite@1.0.30001518:
|
||||
resolution: {integrity: sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==}
|
||||
dev: true
|
||||
|
||||
/chalk@2.4.2:
|
||||
@ -2648,7 +2648,7 @@ packages:
|
||||
/core-js-compat@3.32.0:
|
||||
resolution: {integrity: sha512-7a9a3D1k4UCVKnLhrgALyFcP7YCsLOQIxPd0dKjf/6GuPcgyiGP70ewWdCGrSK7evyhymi0qO4EqCmSJofDeYw==}
|
||||
dependencies:
|
||||
browserslist: 4.21.9
|
||||
browserslist: 4.21.10
|
||||
dev: true
|
||||
|
||||
/core-js@3.32.0:
|
||||
@ -2780,8 +2780,8 @@ packages:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
dev: true
|
||||
|
||||
/electron-to-chromium@1.4.475:
|
||||
resolution: {integrity: sha512-mTye5u5P98kSJO2n7zYALhpJDmoSQejIGya0iR01GpoRady8eK3bw7YHHnjA1Rfi4ZSLdpuzlAC7Zw+1Zu7Z6A==}
|
||||
/electron-to-chromium@1.4.478:
|
||||
resolution: {integrity: sha512-qjTA8djMXd+ruoODDFGnRCRBpID+AAfYWCyGtYTNhsuwxI19s8q19gbjKTwRS5z/LyVf5wICaIiPQGLekmbJbA==}
|
||||
dev: true
|
||||
|
||||
/emoji-regex@8.0.0:
|
||||
@ -2897,8 +2897,8 @@ packages:
|
||||
micromatch: 4.0.5
|
||||
dev: true
|
||||
|
||||
/fast-xml-parser@4.2.6:
|
||||
resolution: {integrity: sha512-Xo1qV++h/Y3Ng8dphjahnYe+rGHaaNdsYOBWL9Y9GCPKpNKilJtilvWkLcI9f9X2DoKTLsZsGYAls5+JL5jfLA==}
|
||||
/fast-xml-parser@4.2.7:
|
||||
resolution: {integrity: sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
strnum: 1.0.5
|
||||
@ -2998,7 +2998,7 @@ packages:
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
cross-spawn: 7.0.3
|
||||
signal-exit: 4.0.2
|
||||
signal-exit: 4.1.0
|
||||
dev: true
|
||||
|
||||
/form-data@4.0.0:
|
||||
@ -3427,7 +3427,7 @@ packages:
|
||||
resolution: {integrity: sha512-v+AgVwiK5DsGtT9ng+m4mClp6zDAmwrW8nZi6Gg15qzvBnRWWdfWA1TGaXyCDnWq5g5asofIgMVl3PjKxvk1ug==}
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
fast-xml-parser: 4.2.6
|
||||
fast-xml-parser: 4.2.7
|
||||
dev: true
|
||||
|
||||
/is-ttf@0.2.2:
|
||||
@ -3637,8 +3637,8 @@ packages:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
dev: true
|
||||
|
||||
/magic-string@0.30.1:
|
||||
resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==}
|
||||
/magic-string@0.30.2:
|
||||
resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
@ -3860,8 +3860,8 @@ packages:
|
||||
resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==}
|
||||
dev: true
|
||||
|
||||
/mutate-animate@1.2.3:
|
||||
resolution: {integrity: sha512-l2Ixv+/NZG0b8B5+ZctX+N/hZslPiSvN6WvzEbOIF0rXouX0br/Yg6/9uc5pQleYhYM2CUPouqrCaUu7Q8QxZg==}
|
||||
/mutate-animate@1.3.1:
|
||||
resolution: {integrity: sha512-3jWiE4+0e8H1LDsTNqLP229OJoRNtoxhXmh7wtmrE82Jb/T/IhpvcMOOi0jE2K7fIpZ9d6ySZqIjHXpLmrL4lg==}
|
||||
dev: false
|
||||
|
||||
/nan@2.17.0:
|
||||
@ -4317,8 +4317,8 @@ packages:
|
||||
glob: 7.2.3
|
||||
dev: true
|
||||
|
||||
/rollup@3.26.3:
|
||||
resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==}
|
||||
/rollup@3.27.0:
|
||||
resolution: {integrity: sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==}
|
||||
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
@ -4405,8 +4405,8 @@ packages:
|
||||
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||
dev: true
|
||||
|
||||
/signal-exit@4.0.2:
|
||||
resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==}
|
||||
/signal-exit@4.1.0:
|
||||
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
@ -4795,7 +4795,7 @@ packages:
|
||||
engines: {node: '>= 10.0.0'}
|
||||
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==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
@ -4806,7 +4806,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@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
|
||||
debug: 4.3.4
|
||||
fast-glob: 3.3.1
|
||||
@ -4830,13 +4830,13 @@ packages:
|
||||
webpack-virtual-modules: 0.5.0
|
||||
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==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
browserslist: '>= 4.21.0'
|
||||
dependencies:
|
||||
browserslist: 4.21.9
|
||||
browserslist: 4.21.10
|
||||
escalade: 3.1.1
|
||||
picocolors: 1.0.0
|
||||
dev: true
|
||||
@ -4954,7 +4954,7 @@ packages:
|
||||
esbuild: 0.18.17
|
||||
less: 4.1.3
|
||||
postcss: 8.4.27
|
||||
rollup: 3.26.3
|
||||
rollup: 3.27.0
|
||||
terser: 5.19.2
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
|
@ -1,12 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv='content-type' content='text/html' charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=Edge, chrome=1'>
|
||||
<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>
|
||||
<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="full-screen" content="yes">
|
||||
<meta name="browsermode" content="application">
|
||||
@ -15,188 +17,190 @@
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<link type='text/css' href='styles.css' rel='stylesheet'>
|
||||
</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化 -->
|
||||
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
|
||||
<body>
|
||||
<div id='startImageBackgroundDiv'>
|
||||
<div id='startImageDiv'></div>
|
||||
<img id='startImageLogo' />
|
||||
</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>
|
||||
<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' 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 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 id='inputDiv'>
|
||||
<div id='inputDialog'>
|
||||
<p id="inputMessage">请输入文字...</p>
|
||||
<input id='inputBox' type="text" autocomplete="off" />
|
||||
<button id='inputYes'>确定</button>
|
||||
<button id='inputNo'>取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='inputDiv'>
|
||||
<div id='inputDialog'>
|
||||
<p id="inputMessage">请输入文字...</p>
|
||||
<input id='inputBox' type="text" autocomplete="off"/>
|
||||
<button id='inputYes'>确定</button>
|
||||
<button id='inputNo'>取消</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ui-editor"></div>
|
||||
<!-- 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>
|
||||
<div id="ui-editor"></div>
|
||||
<!-- 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>
|
||||
|
||||
</html>
|
@ -481,7 +481,6 @@ control.prototype.showStartAnimate = function (noAnimate, callback) {
|
||||
};
|
||||
|
||||
control.prototype._showStartAnimate_resetDom = function () {
|
||||
if (main.mode === 'play') core.plugin.loaded.value = true;
|
||||
core.status.played = false;
|
||||
core.dom.gameGroup.style.display = 'none';
|
||||
core.clearStatus();
|
||||
@ -2318,8 +2317,8 @@ control.prototype._doSL_load = function (id, callback) {
|
||||
1
|
||||
)[0];
|
||||
if (!main.replayChecking) {
|
||||
core.plugin.startOpened.value = false;
|
||||
core.plugin.loaded.value = false;
|
||||
ancTe.plugin.ui.startOpened.value = false;
|
||||
ancTe.plugin.ui.loaded.value = false;
|
||||
}
|
||||
if (core.isPlaying() && !core.status.gameOver) {
|
||||
core.control.autosave(0);
|
||||
@ -2336,8 +2335,8 @@ control.prototype._doSL_load = function (id, callback) {
|
||||
null,
|
||||
function (data) {
|
||||
if (!main.replayChecking && data) {
|
||||
core.plugin.startOpened.value = false;
|
||||
core.plugin.loaded.value = false;
|
||||
ancTe.plugin.ui.startOpened.value = false;
|
||||
ancTe.plugin.ui.loaded.value = false;
|
||||
}
|
||||
if (id == 'autoSave' && data != null) {
|
||||
core.saves.autosave.data = data;
|
||||
@ -3017,7 +3016,7 @@ control.prototype.removeSwitch = function (x, y, floorId, name) {
|
||||
control.prototype.lockControl = function () {
|
||||
core.status.lockControl = true;
|
||||
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;
|
||||
core.plugin = {};
|
||||
// 加载插件
|
||||
if (main.mode === 'play') {
|
||||
main.forward();
|
||||
core.resetSettings();
|
||||
core.plugin.showMarkedEnemy.value = true;
|
||||
}
|
||||
if (main.pluginUseCompress) {
|
||||
await main.loadScript(`project/plugin.min.js?v=${main.version}`);
|
||||
} else {
|
||||
|
@ -26,8 +26,8 @@ events.prototype.startGame = function (hard, seed, route, callback) {
|
||||
hard = hard || '';
|
||||
core.dom.gameGroup.style.display = 'block';
|
||||
if (!main.replayChecking) {
|
||||
core.plugin.startOpened.value = false;
|
||||
core.plugin.loaded.value = false;
|
||||
ancTe.plugin.ui.startOpened.value = false;
|
||||
ancTe.plugin.ui.loaded.value = false;
|
||||
}
|
||||
|
||||
if (main.mode != 'play') return;
|
||||
|
@ -3108,7 +3108,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
|
||||
const block = blocks[i];
|
||||
this.removeBlockByIndex(i, floorId);
|
||||
this._removeBlockFromMap(floorId, block);
|
||||
if (!main.replayChecking) core.updateShadow(true);
|
||||
if (!main.replayChecking) ancTe.plugin.gameShadow.updateShadow(true);
|
||||
return true;
|
||||
}
|
||||
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 (
|
||||
|
@ -4228,5 +4228,6 @@ ui.prototype.deleteAllCanvas = function () {
|
||||
this.deleteCanvas(function () {
|
||||
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);
|
||||
if (main.mode === 'play') main.loading.emit('coreInit');
|
||||
if (main.mode === 'play') {
|
||||
ancTe.plugin.setting.resetSettings();
|
||||
ancTe.plugin.mark.showMarkedEnemy.value = true;
|
||||
}
|
||||
|
||||
core.resize();
|
||||
|
||||
|
@ -50,8 +50,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
core.hideStatusBar(core.hasFlag('showToolbox'));
|
||||
else core.showStatusBar();
|
||||
if (main.mode === 'play' && !main.replayChecking) {
|
||||
core.splitArea();
|
||||
core.resetFlagSettings();
|
||||
ancTe.plugin.fly.splitArea();
|
||||
ancTe.plugin.setting.resetFlagSettings();
|
||||
} else {
|
||||
flags.autoSkill ??= true;
|
||||
flags.itemDetail ??= true;
|
||||
@ -146,8 +146,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
core.drawMap(floorId);
|
||||
|
||||
if (!main.replayChecking) {
|
||||
core.updateShadow();
|
||||
core.setCanvasFilterByFloorId(floorId);
|
||||
ancTe.plugin.gameShadow.updateShadow();
|
||||
ancTe.plugin.gameCanvas.setCanvasFilterByFloorId(floorId);
|
||||
}
|
||||
|
||||
// 切换楼层BGM
|
||||
@ -207,7 +207,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
core.visitFloor(floorId);
|
||||
}
|
||||
}
|
||||
if (!flags.debug && !main.replayChecking) core.checkVisitedFloor();
|
||||
if (!flags.debug && !main.replayChecking)
|
||||
ancTe.plugin.completion.checkVisitedFloor();
|
||||
},
|
||||
flyTo: function (toId, callback) {
|
||||
// 楼层传送器的使用,从当前楼层飞往toId
|
||||
@ -1013,15 +1014,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
case 67: // C:怪物临界
|
||||
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
||||
core.plugin.fixedDetailPanel = 'critical';
|
||||
core.plugin.showFixed.value = false;
|
||||
core.plugin.fixedDetailOpened.value = true;
|
||||
ancTe.plugin.fixed.showFixed.value = false;
|
||||
ancTe.plugin.ui.fixedDetailOpened.value = true;
|
||||
}
|
||||
break;
|
||||
case 69: // E:怪物属性
|
||||
if (core.getBlockCls(mx, my)?.startsWith('enemy')) {
|
||||
core.plugin.fixedDetailPanel = 'special';
|
||||
core.plugin.showFixed.value = false;
|
||||
core.plugin.fixedDetailOpened.value = true;
|
||||
ancTe.plugin.fixed.showFixed.value = false;
|
||||
ancTe.plugin.ui.fixedDetailOpened.value = true;
|
||||
}
|
||||
break;
|
||||
case 77: // M:快速标记
|
||||
@ -1029,12 +1030,18 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
const block = blocks[`${mx},${my}`];
|
||||
if (block.event.cls.startsWith('enemy')) {
|
||||
const name = core.material.enemys[block.event.id].name;
|
||||
if (core.hasMarkedEnemy(block.event.id)) {
|
||||
core.tip('success', `已取消标记${name}!`);
|
||||
core.unmarkEnemy(block.event.id);
|
||||
if (ancTe.plugin.mark.hasMarkedEnemy(block.event.id)) {
|
||||
ancTe.plugin.utils.tip(
|
||||
'success',
|
||||
`已取消标记${name}!`
|
||||
);
|
||||
ancTe.plugin.mark.unmarkEnemy(block.event.id);
|
||||
} else {
|
||||
core.tip('success', `已标记${name}!`);
|
||||
core.markEnemy(block.event.id);
|
||||
ancTe.plugin.utils.tip(
|
||||
'success',
|
||||
`已标记${name}!`
|
||||
);
|
||||
ancTe.plugin.mark.checkMarkedEnemy(block.event.id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1050,7 +1057,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
case 49: // 1: 断灭之刃
|
||||
if (!flags.bladeOn) break;
|
||||
if (flags.autoSkill) {
|
||||
core.tip('error', '已开启自动切换技能!');
|
||||
ancTe.plugin.utils.tip('error', '已开启自动切换技能!');
|
||||
break;
|
||||
}
|
||||
core.status.route.push('key:49'); // 将按键记在录像中
|
||||
@ -1077,7 +1084,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
case 51: // 3: 铸剑为盾
|
||||
if (!flags.shieldOn) break;
|
||||
if (flags.autoSkill) {
|
||||
core.tip('error', '已开启自动切换技能!');
|
||||
ancTe.plugin.utils.tip('error', '已开启自动切换技能!');
|
||||
break;
|
||||
}
|
||||
core.status.route.push('key:51'); // 将按键记在录像中
|
||||
@ -1184,7 +1191,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
if (callback) callback();
|
||||
|
||||
if (flags.onChase) {
|
||||
core.startChase(flags.chaseIndex);
|
||||
ancTe.plugin.fly.startChase(flags.chaseIndex);
|
||||
if (flags.chaseIndex === 1) {
|
||||
core.playBgm('escape.mp3', 43.5);
|
||||
}
|
||||
@ -1244,9 +1251,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
||||
core.plugin.skillTree.getSkillLevel(11) > 0 &&
|
||||
(core.status.hero.special?.num ?? []).length > 0
|
||||
) {
|
||||
core.plugin.showStudiedSkill.value = true;
|
||||
ancTe.plugin.ui.showStudiedSkill.value = true;
|
||||
} else {
|
||||
core.plugin.showStudiedSkill.value = false;
|
||||
ancTe.plugin.ui.showStudiedSkill.value = false;
|
||||
}
|
||||
},
|
||||
moveOneStep: function (callback) {
|
||||
|
@ -1161,21 +1161,21 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"name": "bgm查看器",
|
||||
"canUseItemEffect": "true",
|
||||
"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": {
|
||||
"cls": "constants",
|
||||
"name": "系统设置",
|
||||
"canUseItemEffect": "true",
|
||||
"text": "内含所有系统设置项",
|
||||
"useItemEffect": "if (!core.isReplaying()) core.plugin.settingsOpened.value = true;"
|
||||
"useItemEffect": "if (!core.isReplaying()) ancTe.plugin.ui.settingsOpened.value = true;"
|
||||
},
|
||||
"I560": {
|
||||
"cls": "constants",
|
||||
"name": "百科全书",
|
||||
"canUseItemEffect": "true",
|
||||
"text": "一个包含游戏中所有功能详细说明的百科全书,可以查看游戏中所有的功能",
|
||||
"useItemEffect": "if (!core.isReplaying()) core.plugin.descOpened.value = true;"
|
||||
"useItemEffect": "if (!core.isReplaying()) ancTe.plugin.ui.descOpened.value = true;"
|
||||
},
|
||||
"I565": {
|
||||
"cls": "constants",
|
||||
@ -1233,7 +1233,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
|
||||
"cls": "constants",
|
||||
"name": "成就",
|
||||
"canUseItemEffect": "true",
|
||||
"useItemEffect": "core.plugin.achievementOpened.value = true;",
|
||||
"useItemEffect": "ancTe.plugin.ui.achievementOpened.value = true;",
|
||||
"text": "可以查看成就"
|
||||
}
|
||||
}
|
@ -68,7 +68,7 @@ onMounted(async () => {
|
||||
resize();
|
||||
|
||||
await sleep(50);
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
document.addEventListener('keyup', key);
|
||||
});
|
||||
onUpdated(resize);
|
||||
|
@ -1,20 +1,43 @@
|
||||
import { BgmController } from './audio/bgm';
|
||||
import { SoundController } from './audio/sound';
|
||||
import { readyAllResource } from './loader/load';
|
||||
import { loading, readyAllResource } from './loader/load';
|
||||
import { ResourceStore, ResourceType } from './loader/resource';
|
||||
import { resolvePlugin } from './plugin';
|
||||
|
||||
declare global {
|
||||
interface AncTe {
|
||||
sound: SoundController;
|
||||
/** 游戏资源 */
|
||||
resource: ResourceStore<Exclude<ResourceType, 'zip'>>;
|
||||
zipResource: ResourceStore<'zip'>;
|
||||
bgm: BgmController;
|
||||
}
|
||||
interface Window {
|
||||
ancTe: AncTe;
|
||||
}
|
||||
const ancTe: AncTe;
|
||||
interface AncTePlugin {
|
||||
pop: ReturnType<typeof import('../plugin/pop').default>;
|
||||
ui: ReturnType<typeof import('../plugin/uiController').default>;
|
||||
use: ReturnType<typeof import('../plugin/use').default>;
|
||||
animate: ReturnType<typeof import('../plugin/animateController').default>;
|
||||
utils: ReturnType<typeof import('../plugin/utils').default>;
|
||||
status: ReturnType<typeof import('../plugin/ui/statusBar').default>;
|
||||
mark: ReturnType<typeof import('../plugin/mark').default>;
|
||||
setting: ReturnType<typeof import('../plugin/settings').default>;
|
||||
chapter: ReturnType<typeof import('../plugin/ui/chapter').default>;
|
||||
fly: ReturnType<typeof import('../plugin/ui/fly').default>;
|
||||
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() {
|
||||
@ -22,9 +45,12 @@ function ready() {
|
||||
bgm: new BgmController(),
|
||||
resource: new ResourceStore(),
|
||||
zipResource: new ResourceStore(),
|
||||
sound: new SoundController()
|
||||
sound: new SoundController(),
|
||||
// @ts-ignore
|
||||
plugin: {}
|
||||
};
|
||||
|
||||
readyAllResource();
|
||||
loading.once('coreInit', resolvePlugin);
|
||||
}
|
||||
ready();
|
||||
|
@ -1,5 +1,4 @@
|
||||
import resource from '../../data/resource.json';
|
||||
import { has } from '../../plugin/utils';
|
||||
import { EmitableEvent, EventEmitter } from '../common/eventEmitter';
|
||||
import { Resource, getTypeByResource } from './resource';
|
||||
|
||||
@ -118,7 +117,7 @@ export const loading = new GameLoading();
|
||||
|
||||
declare global {
|
||||
interface Main {
|
||||
loading: EventEmitter<GameLoadEvent>;
|
||||
loading: GameLoading;
|
||||
}
|
||||
}
|
||||
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": [
|
||||
"第一章完成度达到100%"
|
||||
],
|
||||
"progress": "${core.getChapterCompletion(1)} / 100",
|
||||
"progress": "${ancTe.plugin.completion.getChapterCompletion(1)} / 100",
|
||||
"percent": true,
|
||||
"point": 50
|
||||
},
|
||||
@ -55,7 +55,7 @@
|
||||
"text": [
|
||||
"第二章完成度达到100%"
|
||||
],
|
||||
"progress": "${core.getChapterCompletion(2)} / 100",
|
||||
"progress": "${ancTe.plugin.completion.getChapterCompletion(2)} / 100",
|
||||
"percent": true,
|
||||
"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 './styles.less';
|
||||
import 'ant-design-vue/dist/antd.dark.css';
|
||||
import './initPlugin';
|
||||
import './core/index';
|
||||
|
||||
createApp(App).mount('#root');
|
||||
createApp(App2).mount('#root2');
|
||||
|
||||
main.init('play');
|
||||
main.listen();
|
||||
|
@ -191,7 +191,7 @@ core.events.afterBattle = function (
|
||||
canvas.width = 32;
|
||||
canvas.height = 32;
|
||||
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;
|
||||
frag.style.imageRendering = 'pixelated';
|
||||
frag.style.width = `${frag.width * core.domStyle.scale}px`;
|
||||
|
@ -10,7 +10,7 @@ control.prototype.checkBlock = function (forceMockery: boolean = false) {
|
||||
const damage = info?.damage;
|
||||
if (damage) {
|
||||
if (!main.replayChecking) {
|
||||
core.addPop(
|
||||
ancTe.plugin.pop.addPop(
|
||||
(x - core.bigmap.offsetX / 32) * 32 + 12,
|
||||
(y - core.bigmap.offsetY / 32) * 32 + 20,
|
||||
(-damage).toString()
|
||||
|
@ -36,7 +36,7 @@ export function removeMaps(fromId, toId, force) {
|
||||
deleted = true;
|
||||
}
|
||||
if (deleted && !main.replayChecking) {
|
||||
core.splitArea();
|
||||
ancTe.plugin.fly.splitArea();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ export function getSkillConsume(skill) {
|
||||
|
||||
export function openTree() {
|
||||
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 (!canStudySkill(number)) {
|
||||
if (!main.replayChecking) {
|
||||
core.tip('error', `无法学习${special}`);
|
||||
ancTe.plugin.utils.tip('error', `无法学习${special}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -496,7 +496,11 @@ function intelligentArrow(fromSelf) {
|
||||
damaged[loc + direction] = true;
|
||||
core.drawHeroAnimate('hand');
|
||||
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();
|
||||
if (core.status.hero.hp < 0) {
|
||||
clearInterval(skill1);
|
||||
@ -511,7 +515,11 @@ function intelligentArrow(fromSelf) {
|
||||
damaged[loc + direction] = true;
|
||||
core.drawHeroAnimate('hand');
|
||||
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();
|
||||
if (core.status.hero.hp < 0) {
|
||||
clearInterval(skill1);
|
||||
@ -637,7 +645,7 @@ function icyMomentem() {
|
||||
if (x == locs[index][0] && y == locs[index][1]) {
|
||||
core.drawHeroAnimate('hand');
|
||||
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();
|
||||
if (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;
|
||||
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
|
||||
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();
|
||||
if (core.status.hero.hp < 0) {
|
||||
core.status.hero.hp = 0;
|
||||
@ -976,7 +984,11 @@ function ballThunder() {
|
||||
) {
|
||||
damaged[i] = true;
|
||||
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.playSound('electron.mp3');
|
||||
if (core.status.hero.hp < 0) {
|
||||
@ -1482,7 +1494,7 @@ function boomingAnimate() {
|
||||
hy = core.status.hero.loc.y;
|
||||
if (loc[0] == hx && loc[1] == hy) {
|
||||
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();
|
||||
if (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];
|
||||
if (n1 * n2 <= 0) {
|
||||
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.playSound('electron.mp3');
|
||||
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];
|
||||
if (n1 * n2 <= 0) {
|
||||
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.playSound('electron.mp3');
|
||||
if (core.status.hero.hp < 0) {
|
||||
|
@ -12,30 +12,34 @@ export {};
|
||||
function openItemShop(itemShopId) {
|
||||
if (!core.isReplaying()) {
|
||||
core.plugin.openedShopId = itemShopId;
|
||||
core.plugin.shopOpened.value = true;
|
||||
ancTe.plugin.ui.shopOpened.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
function updateVueStatusBar() {
|
||||
if (main.replayChecking) return;
|
||||
core.plugin.statusBarStatus.value = !core.plugin.statusBarStatus.value;
|
||||
core.checkMarkedEnemy();
|
||||
ancTe.plugin.mark.checkMarkedEnemy();
|
||||
}
|
||||
|
||||
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 () {
|
||||
if (!core.isReplaying()) return (core.plugin.toolOpened.value = true);
|
||||
if (!core.isReplaying())
|
||||
return (ancTe.plugin.ui.toolOpened.value = true);
|
||||
};
|
||||
|
||||
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 () {
|
||||
if (!core.isReplaying()) return (core.plugin.flyOpened.value = true);
|
||||
if (!core.isReplaying())
|
||||
return (ancTe.plugin.ui.flyOpened.value = true);
|
||||
};
|
||||
|
||||
control.prototype.updateStatusBar_update = function () {
|
||||
@ -53,7 +57,7 @@ export {};
|
||||
control.prototype.showStatusBar = function () {
|
||||
if (main.mode == 'editor') return;
|
||||
core.removeFlag('hideStatusBar');
|
||||
core.plugin.showStatusBar.value = true;
|
||||
ancTe.plugin.ui.showStatusBar.value = true;
|
||||
core.dom.tools.hard.style.display = 'block';
|
||||
core.dom.toolBar.style.display = 'block';
|
||||
};
|
||||
@ -64,7 +68,7 @@ export {};
|
||||
// 如果原本就是隐藏的,则先显示
|
||||
if (!core.domStyle.showStatusBar) this.showStatusBar();
|
||||
if (core.isReplaying()) showToolbox = true;
|
||||
core.plugin.showStatusBar.value = false;
|
||||
ancTe.plugin.ui.showStatusBar.value = false;
|
||||
|
||||
var toolItems = core.dom.tools;
|
||||
core.setFlag('hideStatusBar', true);
|
||||
@ -83,13 +87,13 @@ export {};
|
||||
|
||||
function showChapter(chapter) {
|
||||
if (core.isReplaying()) return;
|
||||
core.plugin.chapterContent.value = chapter;
|
||||
core.plugin.chapterShowed.value = true;
|
||||
ancTe.plugin.chapter.chapterContent.value = chapter;
|
||||
ancTe.plugin.chapter.chapterShowed.value = true;
|
||||
}
|
||||
|
||||
function openSkill() {
|
||||
if (core.isReplaying()) return;
|
||||
core.plugin.skillOpened.value = true;
|
||||
ancTe.plugin.ui.skillOpened.value = true;
|
||||
}
|
||||
|
||||
core.plugin.gameUi = {
|
||||
|
@ -33,7 +33,7 @@ export const antiAliasing = ref(true);
|
||||
export const fullscreen = ref(false);
|
||||
|
||||
watch(transition, n => {
|
||||
core.plugin.transition.value = n;
|
||||
ancTe.plugin.ui.transition.value = n;
|
||||
core.setLocalStorage('transition', n);
|
||||
});
|
||||
|
||||
@ -88,7 +88,7 @@ watch(antiAliasing, n => {
|
||||
function reset() {
|
||||
const t = core.getLocalStorage('transition', false);
|
||||
transition.value = t;
|
||||
core.plugin.transition.value = transition.value;
|
||||
ancTe.plugin.ui.transition.value = transition.value;
|
||||
autoScale.value = core.getLocalStorage('autoScale', true);
|
||||
showStudied.value = core.getLocalStorage('showStudied', true);
|
||||
showHalo.value = core.getLocalStorage('showHalo', true);
|
||||
|
@ -13,6 +13,8 @@ import Shop from '../ui/shop.vue';
|
||||
import Achievement from '../ui/achievement.vue';
|
||||
import Bgm from '../ui/bgmList.vue';
|
||||
|
||||
// todo: 优化开启控制器
|
||||
|
||||
export const bookOpened = ref(false);
|
||||
export const toolOpened = ref(false);
|
||||
export const equipOpened = ref(false);
|
||||
@ -25,23 +27,15 @@ export const flyOpened = ref(false);
|
||||
export const showStudiedSkill = ref(false);
|
||||
export const fixedDetailOpened = ref(false);
|
||||
export const shopOpened = ref(false);
|
||||
export const startOpened = ref(false);
|
||||
export const startOpened = ref(true);
|
||||
export const achievementOpened = ref(false);
|
||||
export const bgmOpened = ref(false);
|
||||
|
||||
export const transition = ref(true);
|
||||
export const noClosePanel = ref(false);
|
||||
|
||||
export const loaded = 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;
|
||||
|
||||
/** ui声明列表 */
|
||||
@ -98,7 +92,6 @@ export default function init() {
|
||||
shopOpened,
|
||||
startOpened,
|
||||
startAnimationEnded,
|
||||
loaded,
|
||||
achievementOpened,
|
||||
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>;
|
||||
|
||||
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);
|
||||
|
||||
function exit() {
|
||||
core.plugin.bgmOpened.value = false;
|
||||
ancTe.plugin.ui.bgmOpened.value = false;
|
||||
}
|
||||
|
||||
function select(id: BgmIds) {
|
||||
|
@ -166,8 +166,8 @@ async function show() {
|
||||
*/
|
||||
async function exit() {
|
||||
noClosePanel.value = true;
|
||||
core.plugin.bookOpened.value = false;
|
||||
if (core.plugin.transition.value) await sleep(650);
|
||||
ancTe.plugin.ui.bookOpened.value = false;
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(650);
|
||||
else await sleep(100);
|
||||
if (core.events.recoverEvents(core.status.event.interval)) {
|
||||
return;
|
||||
@ -244,7 +244,7 @@ function keydown(e: KeyboardEvent) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
document.addEventListener('keydown', keydown);
|
||||
|
@ -28,7 +28,7 @@ type DescKey = keyof typeof desc;
|
||||
const selected = ref(Object.keys(desc)[0] as DescKey);
|
||||
|
||||
function exit() {
|
||||
core.plugin.descOpened.value = false;
|
||||
ancTe.plugin.ui.descOpened.value = false;
|
||||
}
|
||||
|
||||
const content = computed(() => {
|
||||
|
@ -311,7 +311,7 @@ function changeSort() {
|
||||
}
|
||||
|
||||
function exit() {
|
||||
core.plugin.equipOpened.value = false;
|
||||
ancTe.plugin.ui.equipOpened.value = false;
|
||||
}
|
||||
|
||||
function clickList(i: number) {
|
||||
@ -429,12 +429,12 @@ function dragout(e: Event) {
|
||||
}
|
||||
|
||||
async function toTool() {
|
||||
const before = core.plugin.transition.value;
|
||||
core.plugin.transition.value = false;
|
||||
const before = ancTe.plugin.ui.transition.value;
|
||||
ancTe.plugin.ui.transition.value = false;
|
||||
exit();
|
||||
await sleep(50);
|
||||
core.plugin.toolOpened.value = true;
|
||||
core.plugin.transition.value = before;
|
||||
ancTe.plugin.ui.toolOpened.value = true;
|
||||
ancTe.plugin.ui.transition.value = before;
|
||||
}
|
||||
|
||||
function keyup(e: KeyboardEvent) {
|
||||
@ -455,7 +455,7 @@ watch(toShow, n => {
|
||||
|
||||
onMounted(async () => {
|
||||
bind();
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
});
|
||||
|
@ -84,7 +84,7 @@ async function calHeight() {
|
||||
vw = window.innerWidth;
|
||||
width.value = vh * 0.28;
|
||||
await new Promise(res => requestAnimationFrame(res));
|
||||
if (core.plugin.fixedDetailOpened.value) {
|
||||
if (ancTe.plugin.ui.fixedDetailOpened.value) {
|
||||
showFixed.value = false;
|
||||
}
|
||||
updateMain();
|
||||
|
@ -30,7 +30,7 @@ if (e && core.getClsFromId(e)?.startsWith('enemy')) {
|
||||
}
|
||||
|
||||
function close() {
|
||||
core.plugin.fixedDetailOpened.value = false;
|
||||
ancTe.plugin.ui.fixedDetailOpened.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -147,7 +147,7 @@ let thumbCtx: CanvasRenderingContext2D;
|
||||
let downloadMode = false;
|
||||
|
||||
function exit() {
|
||||
core.plugin.flyOpened.value = false;
|
||||
ancTe.plugin.ui.flyOpened.value = false;
|
||||
}
|
||||
|
||||
const title = computed(() => {
|
||||
@ -610,7 +610,7 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
await sleep(50);
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
|
||||
document.addEventListener('keyup', keyup);
|
||||
map.addEventListener('touchstart', touchdown);
|
||||
|
@ -137,7 +137,7 @@ const settings: Record<keyof Settings, Ref<boolean>> = {
|
||||
const ignore: (keyof Settings)[] = ['fullscreen'];
|
||||
|
||||
function exit() {
|
||||
core.plugin.settingsOpened.value = false;
|
||||
ancTe.plugin.ui.settingsOpened.value = false;
|
||||
}
|
||||
|
||||
function click(id: keyof Settings) {
|
||||
|
@ -303,12 +303,12 @@ function keydown(e: KeyboardEvent) {
|
||||
|
||||
function exit() {
|
||||
if (bought) core.status.route.push('closeShop');
|
||||
core.plugin.shopOpened.value = false;
|
||||
ancTe.plugin.ui.shopOpened.value = false;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
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('keydown', keydown);
|
||||
core.status.route.push(`openShop:${id}`);
|
||||
|
@ -60,7 +60,7 @@ const content = computed(() => {
|
||||
});
|
||||
|
||||
function exit() {
|
||||
core.plugin.skillOpened.value = false;
|
||||
ancTe.plugin.ui.skillOpened.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -173,7 +173,7 @@ const level = computed(() => {
|
||||
});
|
||||
|
||||
function exit() {
|
||||
core.plugin.skillTreeOpened.value = false;
|
||||
ancTe.plugin.ui.skillTreeOpened.value = false;
|
||||
}
|
||||
|
||||
function resize() {
|
||||
@ -274,7 +274,7 @@ onMounted(async () => {
|
||||
draw();
|
||||
|
||||
await sleep(50);
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
canvas.addEventListener('click', click);
|
||||
document.addEventListener('keyup', key);
|
||||
});
|
||||
|
@ -69,6 +69,7 @@ import { doByInterval, keycode } from '../plugin/utils';
|
||||
import { KeyCode } from '../plugin/keyCodes';
|
||||
import { achievementOpened } from '../plugin/uiController';
|
||||
import { triggerFullscreen } from '../plugin/settings';
|
||||
import { loading } from '../core/loader/load';
|
||||
|
||||
let startdiv: HTMLDivElement;
|
||||
let start: HTMLDivElement;
|
||||
@ -96,6 +97,7 @@ const toshow = reactive<string[]>([]);
|
||||
const selected = ref('start-game');
|
||||
|
||||
function resize() {
|
||||
if (!window.core) return;
|
||||
const scale = core.domStyle.scale;
|
||||
const h = core._PY_;
|
||||
const height = h * scale;
|
||||
@ -290,34 +292,34 @@ async function setButtonAnimate() {
|
||||
|
||||
onMounted(async () => {
|
||||
cursor = document.getElementById('cursor')!;
|
||||
played = core.getLocalStorage('oneweek1', false);
|
||||
startdiv = document.getElementById('start-div') as HTMLDivElement;
|
||||
main = document.getElementById('start-main') as HTMLDivElement;
|
||||
start = document.getElementById('start') as HTMLDivElement;
|
||||
background = document.getElementById('background') as HTMLImageElement;
|
||||
|
||||
core.registerResize('start', resize);
|
||||
resize();
|
||||
loading.once('coreInit', async () => {
|
||||
window.addEventListener('resize', resize);
|
||||
resize();
|
||||
|
||||
soundChecked.value = core.musicStatus.bgmStatus;
|
||||
soundChecked.value = core.musicStatus.bgmStatus;
|
||||
|
||||
await sleep(50);
|
||||
document.addEventListener('keydown', keydown);
|
||||
document.addEventListener('keyup', keyup);
|
||||
start.style.opacity = '1';
|
||||
if (played) {
|
||||
text.value = text2;
|
||||
hard.splice(1, 0, '挑战');
|
||||
}
|
||||
setButtonAnimate().then(() => (showed.value = true));
|
||||
await sleep(1000);
|
||||
showCursor();
|
||||
await sleep(1200);
|
||||
core.dom.startPanel.style.display = 'none';
|
||||
await sleep(50);
|
||||
document.addEventListener('keydown', keydown);
|
||||
document.addEventListener('keyup', keyup);
|
||||
start.style.opacity = '1';
|
||||
if (played) {
|
||||
text.value = text2;
|
||||
hard.splice(1, 0, '挑战');
|
||||
}
|
||||
setButtonAnimate().then(() => (showed.value = true));
|
||||
await sleep(1000);
|
||||
showCursor();
|
||||
await sleep(1200);
|
||||
});
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
core.unregisterResize('start');
|
||||
window.removeEventListener('resize', resize);
|
||||
document.removeEventListener('keydown', keydown);
|
||||
document.removeEventListener('keyup', keyup);
|
||||
});
|
||||
|
@ -165,19 +165,19 @@ async function select(id: ShowItemIds, nouse: boolean = false) {
|
||||
}
|
||||
|
||||
function exit() {
|
||||
core.plugin.toolOpened.value = false;
|
||||
ancTe.plugin.ui.toolOpened.value = false;
|
||||
}
|
||||
|
||||
async function use(id: ShowItemIds) {
|
||||
if (id === 'none') return;
|
||||
if (core.canUseItem(id)) {
|
||||
// 应该暂时把动画去掉
|
||||
const before = core.plugin.transition.value;
|
||||
core.plugin.transition.value = false;
|
||||
const before = ancTe.plugin.ui.transition.value;
|
||||
ancTe.plugin.ui.transition.value = false;
|
||||
exit();
|
||||
await sleep(50);
|
||||
core.useItem(id);
|
||||
core.plugin.transition.value = before;
|
||||
ancTe.plugin.ui.transition.value = before;
|
||||
} else {
|
||||
message.warn({
|
||||
content: '当前无法使用该道具!',
|
||||
@ -187,12 +187,12 @@ async function use(id: ShowItemIds) {
|
||||
}
|
||||
|
||||
async function toEquip() {
|
||||
const before = core.plugin.transition.value;
|
||||
core.plugin.transition.value = false;
|
||||
const before = ancTe.plugin.ui.transition.value;
|
||||
ancTe.plugin.ui.transition.value = false;
|
||||
exit();
|
||||
await sleep(50);
|
||||
core.plugin.equipOpened.value = true;
|
||||
core.plugin.transition.value = before;
|
||||
ancTe.plugin.ui.equipOpened.value = true;
|
||||
ancTe.plugin.ui.transition.value = before;
|
||||
}
|
||||
|
||||
function keyup(e: KeyboardEvent) {
|
||||
@ -239,7 +239,7 @@ function keydown(e: KeyboardEvent) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
if (ancTe.plugin.ui.transition.value) await sleep(600);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
document.addEventListener('keydown', keydown);
|
||||
|
Loading…
Reference in New Issue
Block a user