diff --git a/public/project/floors/MT0.js b/public/project/floors/MT0.js index eb36187..2ebea82 100644 --- a/public/project/floors/MT0.js +++ b/public/project/floors/MT0.js @@ -35,7 +35,7 @@ main.floors.MT0= "\r[red]注意!!!\r[]该塔新增了很多新的功能,同时对样板的ui进行了大幅度的改动,操作也有改变,由于内容过多,这里不再一一描述,具体请在道具栏查看百科全书!!百科全书是在你面前的几个道具中的其中一个", { "type": "function", - "function": "function(){\ncore.plugin.gameUi.showChapter('序章 起源');\n}" + "function": "function(){\nmota.ui.fixed.open('chapter', { chapter: '序章 起源' });\n}" } ], "parallelDo": "", diff --git a/public/project/floors/MT21.js b/public/project/floors/MT21.js index 592f48e..307caf3 100644 --- a/public/project/floors/MT21.js +++ b/public/project/floors/MT21.js @@ -157,7 +157,7 @@ main.floors.MT21= "\t[低级智人]\b[up,hero]或许智慧结晶会告诉我答案吧。", { "type": "function", - "function": "function(){\ncore.plugin.gameUi.showChapter('第二章 智慧');\ncore.plugin.removeMap.removeMaps('tower1', 'tower7', true);\ndelete flags.tower1;\ndelete flags.wordsTimeOut;\ndelete flags.boom;\ndelete flags.booming;\n}" + "function": "function(){\nmota.ui.fixed.open('chapter', { chapter: '第二章 智慧' });\ncore.plugin.removeMap.removeMaps('tower1', 'tower7', true);\ndelete flags.tower1;\ndelete flags.wordsTimeOut;\ndelete flags.boom;\ndelete flags.booming;\n}" }, { "type": "setValue", diff --git a/public/project/floors/MT6.js b/public/project/floors/MT6.js index e498cf8..30c499c 100644 --- a/public/project/floors/MT6.js +++ b/public/project/floors/MT6.js @@ -63,7 +63,7 @@ main.floors.MT6= "\t[原始人]\b[down,hero]感觉好像可以学习一些简单的东西了。", { "type": "function", - "function": "function(){\ncore.plugin.gameUi.showChapter('第一章 勇气');\n}" + "function": "function(){\nmota.ui.fixed.open('chapter', { chapter: '第一章 勇气' });\n}" }, { "type": "setValue", diff --git a/src/core/index.ts b/src/core/index.ts index 49b6083..6b4236c 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -18,10 +18,8 @@ interface AncTePlugin { utils: ReturnType; status: ReturnType; mark: ReturnType; - chapter: ReturnType; fly: ReturnType; chase: ReturnType; - fixed: ReturnType; webglUtils: ReturnType; shadow: ReturnType; gameShadow: ReturnType< diff --git a/src/core/plugin.ts b/src/core/plugin.ts index 4005c22..fe04829 100644 --- a/src/core/plugin.ts +++ b/src/core/plugin.ts @@ -5,7 +5,6 @@ import animate from '@/plugin/animateController'; import utils from '@/plugin/utils'; import status from '@/plugin/ui/statusBar'; import mark from '@/plugin/mark'; -import chapter from '@/plugin/ui/chapter'; import fly from '@/plugin/ui/fly'; import chase from '@/plugin/chase/chase'; import webglUtils from '@/plugin/webgl/utils'; @@ -29,7 +28,6 @@ export function resolvePlugin() { ['utils', utils()], ['status', status()], ['mark', mark()], - ['chapter', chapter()], ['fly', fly()], ['chase', chase()], ['webglUtils', webglUtils()], diff --git a/src/plugin/game/ui.js b/src/plugin/game/ui.js index c54c1fe..3111d89 100644 --- a/src/plugin/game/ui.js +++ b/src/plugin/game/ui.js @@ -5,7 +5,6 @@ export {}; if (main.replayChecking) return (core.plugin.gameUi = { openItemShop: () => 0, - showChapter: () => 0, openSkill: () => 0 }); @@ -86,12 +85,6 @@ export {}; } }; - function showChapter(chapter) { - if (core.isReplaying()) return; - mota.plugin.chapter.chapterContent.value = chapter; - mota.plugin.chapter.chapterShowed.value = true; - } - function openSkill() { if (core.isReplaying()) return; mota.ui.main.open('skill'); @@ -99,7 +92,6 @@ export {}; core.plugin.gameUi = { openItemShop, - openSkill, - showChapter + openSkill }; })(); diff --git a/src/plugin/ui/chapter.ts b/src/plugin/ui/chapter.ts deleted file mode 100644 index f13418a..0000000 --- a/src/plugin/ui/chapter.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ref } from 'vue'; - -export const chapterShowed = ref(false); -export const chapterContent = ref(''); - -export default function init() { - return { chapterShowed, chapterContent }; -} diff --git a/src/plugin/ui/fixed.ts b/src/plugin/ui/fixed.ts index 3ade2f7..a996291 100644 --- a/src/plugin/ui/fixed.ts +++ b/src/plugin/ui/fixed.ts @@ -1,51 +1,8 @@ -import { cloneDeep, debounce } from 'lodash-es'; -import { ref } from 'vue'; import { getDamageColor } from '../utils'; -import { ToShowEnemy, detailInfo } from './book'; +import { ToShowEnemy } from './book'; import { DamageEnemy } from '../game/enemy/damage'; import { isMobile } from '../use'; -// export const showFixed = ref(false); - -// let lastId: EnemyIds; - -// const show = debounce((ev: MouseEvent) => { -// if (!window.flags) return; -// if (!flags.mouseLoc) return; -// flags.clientLoc = [ev.clientX, ev.clientY]; -// const [mx, my] = getLocFromMouseLoc(...flags.mouseLoc); - -// const e = core.status.thisMap.enemy.list.find(v => { -// return v.x === mx && v.y === my; -// }); - -// if (!e) return; - -// lastId = e.id; -// const detail = getDetailedEnemy(e); -// detailInfo.enemy = detail; -// showFixed.value = true; -// }, 200); - -// export default function init() { -// const data = core.canvas.data.canvas; -// data.addEventListener('mousemove', ev => { -// if (!core.isPlaying() || core.status.lockControl) return; -// const [mx, my] = getLocFromMouseLoc(...flags.mouseLoc); -// const e = core.getBlockId(mx, my); -// if (e !== lastId) showFixed.value = false; -// if (!e) return; -// show(ev); -// }); -// data.addEventListener('mousedown', ev => { -// showFixed.value = false; -// }); - -// return { -// showFixed -// }; -// } - export function getLocFromMouseLoc(x: number, y: number): LocArr { const mx = Math.round(x + core.bigmap.offsetX / 32); const my = Math.round(y + core.bigmap.offsetY / 32); diff --git a/src/types/plugin.d.ts b/src/types/plugin.d.ts index 435a1d8..2f1db4e 100644 --- a/src/types/plugin.d.ts +++ b/src/types/plugin.d.ts @@ -177,12 +177,6 @@ interface PluginUis { /** 是否展示标记的怪物 */ readonly showMarkedEnemy: Ref; - /** - * 显示章节 - * @param chapter 显示的文字 - */ - showChapter(chapter: string): void; - /** * 打开技能查看界面 */ diff --git a/src/ui/chapter.vue b/src/ui/chapter.vue index 291e920..f2c24e6 100644 --- a/src/ui/chapter.vue +++ b/src/ui/chapter.vue @@ -6,12 +6,14 @@