重构设置模块

This commit is contained in:
AncTe committed 2023-08-05 12:12:02 +08:00
1 parent b7f0d6f4d8
commit 4d4aeed3cd
14 files changed
+603 -227

No files matched your search

+1 -1
View File
@@ -169,7 +169,7 @@ core.events.afterBattle = function (
else core.clearContinueAutomaticRoute();
// 打怪特效
if (has(x) && has(y)) {
if (core.getLocalStorage('frag') && has(x) && has(y)) {
const frame = core.status.globalAnimateStatus % 2;
const canvas = document.createElement('canvas');
canvas.width = 32;
+1 -1
View File
@@ -31,7 +31,7 @@ core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
// 获取宝石信息 并绘制
function getItemDetail(floorId: FloorIds, onMap: boolean) {
if (!core.getFlag('itemDetail')) return;
if (!core.getLocalStorage('itemDetail')) return;
floorId ??= core.status.thisMap.floorId;
let diff: Record<string | symbol, number | undefined> = {};
const before = core.status.hero;
+8
View File
@@ -21,8 +21,16 @@ export let isMobile = matchMedia('(max-width: 600px)').matches;
window.addEventListener('resize', () => {
requestAnimationFrame(() => {
isMobile = matchMedia('(max-width: 600px)').matches;
checkMobile();
});
});
checkMobile();
function checkMobile() {
if (isMobile) {
alert('手机端建议使用自带的浏览器进行游玩,并在进入游戏后开启全屏游玩');
}
}
/**
* 向一个元素添加拖拽事件