mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-10-31 23:20:18 +08:00
完善部分ui,修改部分剧情
This commit is contained in:
1 parent
3db34ffad9
commit
ce838e0225
21 files changed
+417
-183
No files matched your search
+27
-1
@@ -5,11 +5,32 @@ import { ref, watch } from 'vue';
|
||||
*/
|
||||
export const transition = ref(true);
|
||||
|
||||
/**
|
||||
* 道具详细信息
|
||||
*/
|
||||
export const itemDetail = ref(true);
|
||||
|
||||
/**
|
||||
* 自动切换技能
|
||||
*/
|
||||
export const autoSkill = ref(true);
|
||||
|
||||
watch(transition, n => {
|
||||
core.plugin.transition.value = n;
|
||||
core.setLocalStorage('transition', n);
|
||||
});
|
||||
|
||||
watch(itemDetail, n => {
|
||||
flags.itemDetail = n;
|
||||
core.updateStatusBar();
|
||||
});
|
||||
|
||||
watch(autoSkill, n => {
|
||||
flags.autoSkill = n;
|
||||
core.updateStatusBar();
|
||||
core.status.route.push(`set:autoSkill:${n}`);
|
||||
});
|
||||
|
||||
/**
|
||||
* 重置设置信息,从localStorage读取即可
|
||||
*/
|
||||
@@ -17,6 +38,11 @@ function reset() {
|
||||
transition.value = core.getLocalStorage('transition');
|
||||
}
|
||||
|
||||
function resetFlag() {
|
||||
itemDetail.value = flags.itemDetail;
|
||||
autoSkill.value = flags.autoSkill;
|
||||
}
|
||||
|
||||
export default function init() {
|
||||
return { resetSettings: reset };
|
||||
return { resetSettings: reset, resetFlagSettings: resetFlag };
|
||||
}
|
||||
+2
-2
@@ -35,8 +35,8 @@ export function getDamageColor(damage: number): Color {
|
||||
if (damage < 0) return '#7f7';
|
||||
if (damage < core.status.hero.hp / 3) return '#fff';
|
||||
if (damage < (core.status.hero.hp * 2) / 3) return '#ff4';
|
||||
if (damage < core.status.hero.hp) return '#f22';
|
||||
return '#f00';
|
||||
if (damage < core.status.hero.hp) return '#f93';
|
||||
return '#f22';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user