diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..da46e37 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "bracketSpacing": true, + "vueIndentScriptAndStyle": false, + "arrowParens": "avoid", + "trailingComma": "none" +} \ No newline at end of file diff --git a/public/project/functions.js b/public/project/functions.js index 97ef1ae..41ac5f0 100644 --- a/public/project/functions.js +++ b/public/project/functions.js @@ -425,34 +425,34 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = { if (core.status.event.id == null) core.continueAutomaticRoute(); else core.clearContinueAutomaticRoute(); - // 打怪特效 - if (core.has(x) && core.has(y)) { - const frame = core.status.globalAnimateStatus % 2; - const canvas = document.createElement('canvas'); - canvas.width = 32; - canvas.height = 32; - core.drawIcon(canvas, enemy.id, 0, 0, 32, 32, frame); - const manager = core.applyFragWith(canvas); - const frag = manager.canvas; - frag.style.imageRendering = 'pixelated'; - frag.style.width = `${frag.width * core.domStyle.scale}px`; - frag.style.height = `${frag.height * core.domStyle.scale}px`; - const left = - (x * 32 + 16 - frag.width / 2 - core.bigmap.offsetX) * - core.domStyle.scale; - const top = - (y * 32 + 16 - frag.height / 2 - core.bigmap.offsetY) * - core.domStyle.scale; - frag.style.left = `${left}px`; - frag.style.top = `${top}px`; - frag.style.zIndex = '45'; - frag.style.position = 'absolute'; - frag.style.filter = 'sepia(20%)brightness(120%)'; - core.dom.gameDraw.appendChild(frag); - manager.onEnd.then(() => { - frag.remove(); - }); - } + // 打怪特效 + if (core.has(x) && core.has(y)) { + const frame = core.status.globalAnimateStatus % 2; + const canvas = document.createElement('canvas'); + canvas.width = 32; + canvas.height = 32; + core.drawIcon(canvas, enemy.id, 0, 0, 32, 32, frame); + const manager = core.applyFragWith(canvas); + const frag = manager.canvas; + frag.style.imageRendering = 'pixelated'; + frag.style.width = `${frag.width * core.domStyle.scale}px`; + frag.style.height = `${frag.height * core.domStyle.scale}px`; + const left = + (x * 32 + 16 - frag.width / 2 - core.bigmap.offsetX) * + core.domStyle.scale; + const top = + (y * 32 + 16 - frag.height / 2 - core.bigmap.offsetY) * + core.domStyle.scale; + frag.style.left = `${left}px`; + frag.style.top = `${top}px`; + frag.style.zIndex = '45'; + frag.style.position = 'absolute'; + frag.style.filter = 'sepia(20%)brightness(120%)'; + core.dom.gameDraw.appendChild(frag); + manager.onEnd.then(() => { + frag.remove(); + }); + } }, afterOpenDoor: function (doorId, x, y) { // 开一个门后触发的事件