mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-27 12:24:30 +08:00
refactor: 定点查看怪物详细信息
This commit is contained in:
1 parent
eaad1f0a5a
commit
1e58dbe411
4 files changed
+31
-17
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { debounce } from 'lodash-es';
|
||||
import { gameListener } from '../game';
|
||||
import { fixedUi } from './ui';
|
||||
import { gameListener, hook } from '../game';
|
||||
import { fixedUi, mainUi } from './ui';
|
||||
import { ref } from 'vue';
|
||||
import { sleep } from 'mutate-animate';
|
||||
|
||||
@@ -53,3 +53,10 @@ gameListener.on('mouseMove', e => {
|
||||
showFixed(hovered);
|
||||
}
|
||||
});
|
||||
|
||||
hook.once('mounted', () => {
|
||||
mainUi.on('start', () => {
|
||||
showFixed.cancel();
|
||||
closeFixed();
|
||||
});
|
||||
});
|
||||
@@ -3,6 +3,7 @@ import { Hotkey } from '../custom/hotkey';
|
||||
import { generateBinary, keycode } from '@/plugin/utils';
|
||||
import { hovered } from './fixed';
|
||||
import { hasMarkedEnemy, markEnemy, unmarkEnemy } from '@/plugin/mark';
|
||||
import { mainUi } from './ui';
|
||||
|
||||
export const mainScope = Symbol.for('@key_main');
|
||||
export const gameKey = new Hotkey('gameKey', '游戏按键');
|
||||
@@ -405,8 +406,12 @@ gameKey
|
||||
else markEnemy(id);
|
||||
}
|
||||
})
|
||||
.realize('special', () => {})
|
||||
.realize('critical', () => {})
|
||||
.realize('special', () => {
|
||||
mainUi.open('fixedDetail', { panel: 'special' });
|
||||
})
|
||||
.realize('critical', () => {
|
||||
mainUi.open('fixedDetail', { panel: 'critical' });
|
||||
})
|
||||
.realize('restart', () => {
|
||||
core.confirmRestart();
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user