Cambiados los aspectos visuales del juego a algo gotico

This commit is contained in:
Diego De la Viuda Llorente committed 2026-11-26 18:46:31 +01:00
1 parent ec7e35ddf6
commit 967b3a286d
205 files changed
+7056 -1630

No files matched your search

+22 -43
View File
@@ -3,11 +3,11 @@ class_name ThrashMeter
extends ProgressBar
## Medidor visual compartido por vida y especial; no conoce al jugador ni modifica el combate.
## Conserva el contrato de ProgressBar (value/max_value) y dibuja segmentos de amplificador.
## Conserva el contrato de ProgressBar (value/max_value) y dibuja un deposito continuo de sangre o luz espectral.
## Solo este componente visual se ejecuta en el editor; los controladores del HUD no son @tool.
@export_group("Thrash Appearance")
## Color de los segmentos llenos. La escena de vida usa rojo y la de especial, verde acido.
## Color de los segmentos llenos. La escena de vida usa carmesi y la de especial, turquesa espectral.
@export var fill_color: Color = Color("d73949"):
set(new_value):
fill_color = new_value
@@ -145,49 +145,28 @@ func _draw() -> void:
if size.x < 8.0 or size.y < 6.0:
return
var shown: float = clampf(value / maxf(max_value, 1.0), 0.0, 1.0) if Engine.is_editor_hint() else _display_ratio
var inner := Rect2(Vector2(2, 2), size - Vector2(4, 4))
var count: int = maxi(segment_count, 1)
var step_width: float = inner.size.x / float(count)
var cell_width: float = maxf(step_width - 2.0, 1.0)
draw_rect(Rect2(Vector2.ZERO, size), Color("05090b"))
draw_rect(Rect2(Vector2.ZERO, size), Color("3b464b"), false, 1.0)
for index: int in range(count):
var cell := Rect2(inner.position + Vector2(float(index) * step_width, 0), Vector2(cell_width, inner.size.y))
_draw_segment(cell, 1.0, Color("202b30"))
if show_damage_trail and not Engine.is_editor_hint():
_draw_segment(cell, clampf(_trail_ratio * count - index, 0.0, 1.0), Color("a99774"))
var fraction: float = clampf(shown * count - index, 0.0, 1.0)
_draw_segment(cell, fraction, fill_color)
if fraction > 0.0:
# Bisel iluminado y una linea de sombra dentro de cada segmento.
var bevel: float = minf(3.0, cell.size.x * 0.25)
var length: float = (cell.size.x - bevel) * fraction
draw_line(cell.position + Vector2(bevel, 1), cell.position + Vector2(bevel + length, 1), fill_color.lightened(0.45), 1.0)
draw_line(cell.position + Vector2(0, cell.size.y - 1), cell.position + Vector2(length, cell.size.y - 1), fill_color.darkened(0.4), 1.0)
var inner := Rect2(Vector2(1, 1), size - Vector2(2, 2))
draw_rect(Rect2(Vector2.ZERO, size), Color("100e13"))
draw_rect(inner, Color("21181e"))
if show_damage_trail and not Engine.is_editor_hint() and _trail_ratio > shown:
draw_rect(Rect2(inner.position, Vector2(floorf(inner.size.x * _trail_ratio), inner.size.y)), Color("b99874"))
var filled_width: float = floorf(inner.size.x * shown)
if filled_width > 0.0:
var fill := Rect2(inner.position, Vector2(filled_width, inner.size.y))
draw_rect(fill, fill_color.darkened(0.3))
draw_rect(Rect2(fill.position, Vector2(filled_width, maxf(1.0, floorf(fill.size.y * 0.55)))), fill_color)
draw_line(fill.position, fill.position + Vector2(filled_width, 0), fill_color.lightened(0.45), 1.0)
draw_line(fill.position + Vector2(0, 2), fill.position + Vector2(filled_width, 2), fill_color.lightened(0.15), 1.0)
# Pequenias incisiones de metal reflejan luz; el nivel de carga sigue continuo.
for x: int in range(11, int(filled_width), 37):
draw_rect(Rect2(Vector2(x, maxf(2.0, size.y - 4.0)), Vector2(2, 1)), fill_color.lightened(0.2))
if activation_ratio >= 0.0:
var marker_x: float = inner.position.x + inner.size.x * clampf(activation_ratio, 0.0, 1.0)
draw_line(Vector2(marker_x, 1), Vector2(marker_x, size.y - 1), Color(0.94, 0.94, 0.79, 0.65), 1.0)
draw_colored_polygon(PackedVector2Array([
Vector2(marker_x, size.y), Vector2(marker_x - 3, size.y + 4), Vector2(marker_x + 3, size.y + 4)
]), Color("e7e7ca"))
var marker_x: float = floorf(inner.position.x + inner.size.x * clampf(activation_ratio, 0.0, 1.0))
draw_line(Vector2(marker_x, 1), Vector2(marker_x, size.y - 1), Color(0.85, 0.77, 0.56, 0.7), 1.0)
if highlighted:
var strength: float = 0.7
var strength: float = 0.4
if animations_enabled and not Engine.is_editor_hint():
strength = 0.65 + sin(_pulse_phase) * 0.2
draw_rect(Rect2(Vector2(-1, -1), size + Vector2(2, 2)), Color(fill_color, strength), false, 1.0)
strength = 0.35 + sin(_pulse_phase) * 0.13
draw_line(Vector2(1, 0), Vector2(maxf(filled_width, 1.0), 0), Color(fill_color.lightened(0.7), strength), 1.0)
if _damage_flash > 0.0 and animations_enabled and not Engine.is_editor_hint():
draw_rect(Rect2(Vector2.ZERO, size), Color(1.0, 0.87, 0.76, _damage_flash * 1.5))
## Recorta cada segmento en diagonal sin texturas adicionales ni shaders.
func _draw_segment(rect: Rect2, fraction: float, color: Color) -> void:
if fraction <= 0.0:
return
var bevel: float = minf(3.0, rect.size.x * 0.25)
var length: float = (rect.size.x - bevel) * fraction
var origin: Vector2 = rect.position
draw_colored_polygon(PackedVector2Array([
origin + Vector2(bevel, 0), origin + Vector2(bevel + length, 0),
origin + Vector2(length, rect.size.y), origin + Vector2(0, rect.size.y)
]), color)