1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/Variants/VerticalColorBar.gd
T
fallingshrimp a7d1264830 feat(UI): 重构能量条为垂直样式并调整UI布局
refactor: 修改能量恢复随机范围从0.01-0.15调整为0.01-0.1
style: 更新着色器进度范围提示从0.0-2.0改为-0.0-2.0
feat: 新增垂直颜色条组件和样式资源
chore: 恢复测试波次为普通模式
2025-09-09 22:26:16 +08:00

9 lines
396 B
GDScript

@tool
extends ColorBar
class_name VerticalColorBar
func _draw():
draw_style_box(backBox, Rect2(0, 0, size.x, size.y))
draw_style_box(middleBox2 if forwardDirection > 0 else middleBox1, Rect2(0, size.y * (1 - getPercent(middleValue)), size.x, size.y * getPercent(middleValue)))
draw_style_box(frontBox, Rect2(0, size.y * (1 - getPercent(frontValue)), size.x, size.y * getPercent(frontValue)))