mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-18 20:09:27 +08:00
优化ui
This commit is contained in:
parent
cc6ee7e7af
commit
7e9aa28bc0
@ -7,7 +7,7 @@
|
||||
]
|
||||
},
|
||||
"blade": {
|
||||
"text": "1: 断灭之刃",
|
||||
"text": "1:断灭之刃",
|
||||
"opened": "core.getSkillLevel(2) > 0",
|
||||
"desc": [
|
||||
"<span style=\"color: gold\">快捷键1</span>,开启后勇士攻击增加${level:2 * 10}%,",
|
||||
@ -18,7 +18,7 @@
|
||||
]
|
||||
},
|
||||
"jump": {
|
||||
"text": "2: 跳跃",
|
||||
"text": "2:跳跃",
|
||||
"opened": "flags.skill2 === true",
|
||||
"desc": [
|
||||
"<span style=\"color: gold\">快捷键2</span>,消耗200点生命值,困难消耗400点,一个地图只能使用3次,",
|
||||
|
@ -181,6 +181,8 @@ function draw() {
|
||||
);
|
||||
if (core.getSkillLevel(s.index) < v.front[i][1])
|
||||
ctx.strokeStyle = '#aaa';
|
||||
else if (core.getSkillLevel(s.index) === s.max)
|
||||
ctx.strokeStyle = '#ff0';
|
||||
else ctx.strokeStyle = '#0f8';
|
||||
ctx.lineWidth = devicePixelRatio;
|
||||
ctx.stroke();
|
||||
@ -190,15 +192,23 @@ function draw() {
|
||||
const [x, y] = v.loc.map(v => v * 2 - 1);
|
||||
const level = core.getSkillLevel(v.index);
|
||||
// 技能图标
|
||||
if (selected.value === v.index) ctx.strokeStyle = '#ff0';
|
||||
else if (level === 0) ctx.strokeStyle = '#888';
|
||||
ctx.save();
|
||||
ctx.lineWidth = per * 0.06;
|
||||
if (selected.value === v.index) {
|
||||
ctx.strokeStyle = '#ff0';
|
||||
ctx.lineWidth *= 2;
|
||||
} else if (level === 0) ctx.strokeStyle = '#888';
|
||||
else if (level === v.max) ctx.strokeStyle = '#F7FF68';
|
||||
else ctx.strokeStyle = '#00FF69';
|
||||
ctx.lineWidth = per * 0.03;
|
||||
ctx.strokeRect(x * per, y * per, per, per);
|
||||
const img =
|
||||
core.material.images.images[`skill${v.index}.png` as ImageIds];
|
||||
ctx.drawImage(img, x * per, y * per, per, per);
|
||||
if (selected.value === v.index) {
|
||||
ctx.fillStyle = '#ff04';
|
||||
ctx.fillRect(x * per, y * per, per, per);
|
||||
}
|
||||
ctx.restore();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user