Compare commits

...

3 Commits

6 changed files with 14 additions and 10 deletions

View File

@ -51,7 +51,7 @@ export const FloorSelector = defineComponent<
const scrollRef = ref<ScrollExpose>(); const scrollRef = ref<ScrollExpose>();
const floors = computed(() => props.floors.toReversed()); const floors = computed(() => props.floors.toReversed());
const floorId = computed(() => floors.value[now.value]); const floorId = computed(() => props.floors[now.value]);
const floorName = computed(() => core.floors[floorId.value].title); const floorName = computed(() => core.floors[floorId.value].title);
watch( watch(

View File

@ -277,10 +277,10 @@ export const PauseIcon = defineIcon(1, (loc, pad) => {
export const DoubleArrow = defineIcon(1, (loc, pad) => { export const DoubleArrow = defineIcon(1, (loc, pad) => {
const path = new Path2D(); const path = new Path2D();
const path2 = new Path2D(); const path2 = new Path2D();
const [, , width, height, cx, cy] = loc; const [, , , height, cx, cy] = loc;
const [left, right, top, bottom] = pad(5); const [left, right, top, bottom] = pad(5);
path.moveTo(left, top + height / 12); path.moveTo(left, top + height / 12);
path.lineTo(cx + width / 8, cy); path.lineTo(cx, cy);
path.lineTo(left, bottom - height / 12); path.lineTo(left, bottom - height / 12);
path.closePath(); path.closePath();
path2.moveTo(cx, top + height / 12); path2.moveTo(cx, top + height / 12);

View File

@ -25,6 +25,7 @@ import { saveSave, saveLoad } from './save';
import { mainUIController } from './controller'; import { mainUIController } from './controller';
import { MAIN_WIDTH, MAIN_HEIGHT } from '../shared'; import { MAIN_WIDTH, MAIN_HEIGHT } from '../shared';
import { openSettings } from './settings'; import { openSettings } from './settings';
import { openViewMap } from './viewmap';
interface ToolbarProps extends DefaultProps { interface ToolbarProps extends DefaultProps {
loc?: ElementLocator; loc?: ElementLocator;
@ -110,9 +111,7 @@ export const PlayingToolbar = defineComponent<
const redo = () => core.doSL('autoSave', 'reload'); const redo = () => core.doSL('autoSave', 'reload');
const numpad = () => emit('numpad'); const numpad = () => emit('numpad');
const view = () => { const view = () => {
if (core.isPlaying() && !core.isMoving() && !core.status.lockControl) { openViewMap(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]);
core.ui._drawViewMaps();
}
}; };
const danmaku = () => requestAnimationFrame(openDanmakuPoster); const danmaku = () => requestAnimationFrame(openDanmakuPoster);
const replay = () => core.ui._drawReplay(); const replay = () => core.ui._drawReplay();

View File

@ -1,6 +1,6 @@
import { has, ofDir } from '@user/data-utils'; import { has, ofDir } from '@user/data-utils';
export function init() { export function createCheckBlock() {
// 伤害弹出 // 伤害弹出
// 复写阻激夹域检测 // 复写阻激夹域检测
control.prototype.checkBlock = function (forceMockery: boolean = false) { control.prototype.checkBlock = function (forceMockery: boolean = false) {
@ -52,7 +52,7 @@ function checkMockery(loc: string, force: boolean = false) {
action.push({ type: 'forbidSave', forbid: true }); action.push({ type: 'forbidSave', forbid: true });
action.push({ type: 'changePos', direction: dir }); action.push({ type: 'changePos', direction: dir });
const blocks = core.getMapBlocksObj(); const blocks = core.getMapBlocksObj();
while (1) { while (true) {
x += dx; x += dx;
y += dy; y += dy;
const block = blocks[`${x},${y}`]; const block = blocks[`${x},${y}`];

View File

@ -1,6 +1,8 @@
import { init as initCheckBlock } from './checkblock'; import { createCheckBlock } from './checkblock';
initCheckBlock(); export function createEnemy() {
createCheckBlock();
}
export * from './checkblock'; export * from './checkblock';
export * from './remainEnemy'; export * from './remainEnemy';

View File

@ -4,10 +4,12 @@ import { initFiveLayer } from './fiveLayer';
import { createHook } from './hook'; import { createHook } from './hook';
import { initReplay } from './replay'; import { initReplay } from './replay';
import { initUI } from './ui'; import { initUI } from './ui';
import { createEnemy } from './enemy';
export function createLegacy() { export function createLegacy() {
initFallback(); initFallback();
loading.once('coreInit', () => { loading.once('coreInit', () => {
createEnemy();
initFiveLayer(); initFiveLayer();
createHook(); createHook();
initReplay(); initReplay();
@ -15,6 +17,7 @@ export function createLegacy() {
}); });
} }
export * from './enemy';
export * from './chase'; export * from './chase';
export * from './fallback'; export * from './fallback';
export * from './fiveLayer'; export * from './fiveLayer';