mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-18 17:48:52 +08:00
格式化
This commit is contained in:
parent
6b412c1691
commit
2c7fdd2d21
12
.prettierrc
Normal file
12
.prettierrc
Normal file
@ -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"
|
||||||
|
}
|
@ -425,34 +425,34 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
|
|||||||
if (core.status.event.id == null) core.continueAutomaticRoute();
|
if (core.status.event.id == null) core.continueAutomaticRoute();
|
||||||
else core.clearContinueAutomaticRoute();
|
else core.clearContinueAutomaticRoute();
|
||||||
|
|
||||||
// 打怪特效
|
// 打怪特效
|
||||||
if (core.has(x) && core.has(y)) {
|
if (core.has(x) && core.has(y)) {
|
||||||
const frame = core.status.globalAnimateStatus % 2;
|
const frame = core.status.globalAnimateStatus % 2;
|
||||||
const canvas = document.createElement('canvas');
|
const canvas = document.createElement('canvas');
|
||||||
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 = core.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`;
|
||||||
frag.style.height = `${frag.height * core.domStyle.scale}px`;
|
frag.style.height = `${frag.height * core.domStyle.scale}px`;
|
||||||
const left =
|
const left =
|
||||||
(x * 32 + 16 - frag.width / 2 - core.bigmap.offsetX) *
|
(x * 32 + 16 - frag.width / 2 - core.bigmap.offsetX) *
|
||||||
core.domStyle.scale;
|
core.domStyle.scale;
|
||||||
const top =
|
const top =
|
||||||
(y * 32 + 16 - frag.height / 2 - core.bigmap.offsetY) *
|
(y * 32 + 16 - frag.height / 2 - core.bigmap.offsetY) *
|
||||||
core.domStyle.scale;
|
core.domStyle.scale;
|
||||||
frag.style.left = `${left}px`;
|
frag.style.left = `${left}px`;
|
||||||
frag.style.top = `${top}px`;
|
frag.style.top = `${top}px`;
|
||||||
frag.style.zIndex = '45';
|
frag.style.zIndex = '45';
|
||||||
frag.style.position = 'absolute';
|
frag.style.position = 'absolute';
|
||||||
frag.style.filter = 'sepia(20%)brightness(120%)';
|
frag.style.filter = 'sepia(20%)brightness(120%)';
|
||||||
core.dom.gameDraw.appendChild(frag);
|
core.dom.gameDraw.appendChild(frag);
|
||||||
manager.onEnd.then(() => {
|
manager.onEnd.then(() => {
|
||||||
frag.remove();
|
frag.remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
afterOpenDoor: function (doorId, x, y) {
|
afterOpenDoor: function (doorId, x, y) {
|
||||||
// 开一个门后触发的事件
|
// 开一个门后触发的事件
|
||||||
|
Loading…
Reference in New Issue
Block a user