Personajes seleccionables
This commit is contained in:
1 parent
66f4d8b33b
commit
97335c9d21
42 files changed
+5282
-3106
No files matched your search
+103
-2
@@ -29,9 +29,9 @@ func _ready() -> void:
|
||||
z_index = 12
|
||||
texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
|
||||
match kind:
|
||||
&"ground_pound":
|
||||
&"ground_pound", &"electric_pound", &"vocal_dome", &"bass_cracks":
|
||||
_lifetime = 0.60
|
||||
&"solo":
|
||||
&"solo", &"vocal_wave", &"drum_cymbals", &"bass_pulse":
|
||||
_lifetime = 0.62
|
||||
&"death", &"break":
|
||||
_lifetime = 0.48
|
||||
@@ -53,6 +53,18 @@ func _draw() -> void:
|
||||
var progress: float = clampf(_age / _lifetime, 0.0, 1.0)
|
||||
var fade: float = 1.0 - progress
|
||||
match kind:
|
||||
&"electric_pound":
|
||||
_draw_electric_pound(progress, fade)
|
||||
&"vocal_dome":
|
||||
_draw_vocal_dome(progress, fade)
|
||||
&"bass_cracks":
|
||||
_draw_bass_cracks(progress, fade)
|
||||
&"vocal_wave":
|
||||
_draw_vocal_wave(progress, fade)
|
||||
&"drum_cymbals":
|
||||
_draw_drum_cymbals(progress, fade)
|
||||
&"bass_pulse":
|
||||
_draw_bass_pulse(progress, fade)
|
||||
&"ground_pound":
|
||||
_draw_ring(lerpf(8.0, radius, progress), 0.24, Color(1.0, 0.72, 0.34, fade), 3.0)
|
||||
_draw_ring(lerpf(3.0, radius * 0.72, progress), 0.32, Color(1.0, 0.94, 0.68, fade), 2.0)
|
||||
@@ -131,3 +143,92 @@ func _draw_note(point: Vector2, color: Color) -> void:
|
||||
draw_rect(Rect2(point, Vector2(5, 4)), color)
|
||||
draw_rect(Rect2(point + Vector2(4, -10), Vector2(2, 13)), color)
|
||||
draw_rect(Rect2(point + Vector2(6, -10), Vector2(5, 3)), color)
|
||||
|
||||
|
||||
## Diego: descarga al suelo y rayos ramificados, sin nuevas zonas de dano.
|
||||
func _draw_electric_pound(progress: float, fade: float) -> void:
|
||||
var reach: float = lerpf(10.0, radius, sqrt(progress))
|
||||
_draw_ring(reach, 0.27, Color(0.30, 0.80, 1.0, fade), 3.0)
|
||||
for index: int in range(9):
|
||||
var angle: float = PI + PI * float(index) / 8.0
|
||||
var axis := Vector2(cos(angle), sin(angle) * 0.72)
|
||||
var normal := Vector2(-axis.y, axis.x)
|
||||
var bolt := PackedVector2Array([Vector2.ZERO])
|
||||
for step: int in range(1, 6):
|
||||
var fraction: float = float(step) / 5.0
|
||||
var zigzag: float = (-1.0 if (step + index) % 2 == 0 else 1.0) * 5.0
|
||||
bolt.append((axis * reach * fraction + normal * zigzag).round())
|
||||
draw_polyline(bolt, Color(0.20, 0.65, 1.0, fade * 0.72), 5.0)
|
||||
draw_polyline(bolt, Color(0.82, 0.98, 1.0, fade), 1.0)
|
||||
var fork: Vector2 = bolt[3] + normal * (10.0 + progress * 8.0)
|
||||
draw_line(bolt[2], fork.round(), Color(0.48, 0.88, 1.0, fade), 2.0)
|
||||
|
||||
|
||||
## Hector: semicupula amarilla transparente que crece desde el punto de aterrizaje.
|
||||
func _draw_vocal_dome(progress: float, fade: float) -> void:
|
||||
var reach: float = lerpf(5.0, radius, sqrt(progress))
|
||||
var dome := PackedVector2Array()
|
||||
for index: int in range(33):
|
||||
var angle: float = PI + PI * float(index) / 32.0
|
||||
var point := Vector2(cos(angle) * reach, sin(angle) * reach * 0.85).round()
|
||||
# Evita vertices consecutivos iguales al redondear una cupula aun pequena.
|
||||
if dome.is_empty() or dome[dome.size() - 1] != point:
|
||||
dome.append(point)
|
||||
draw_colored_polygon(dome, Color(1.0, 0.83, 0.14, fade * 0.20))
|
||||
draw_polyline(dome, Color(1.0, 0.91, 0.40, fade * 0.95), 3.0)
|
||||
_draw_ring(reach, 0.16, Color(1.0, 0.78, 0.12, fade * 0.8), 2.0)
|
||||
|
||||
|
||||
## Fer: fracturas cortas que quedan ancladas al punto de impacto y luego desaparecen.
|
||||
## No se modifica el TileMap, ni la colision, ni se conserva dano visual del escenario.
|
||||
func _draw_bass_cracks(progress: float, fade: float) -> void:
|
||||
var growth: float = minf(progress * 4.0, 1.0)
|
||||
for side: float in [-1.0, 1.0]:
|
||||
for branch: int in range(3):
|
||||
var crack := PackedVector2Array([Vector2.ZERO])
|
||||
for step: int in range(1, 6):
|
||||
var x: float = side * radius * float(step) / 5.0 * growth
|
||||
var y: float = float(branch - 1) * float(step) * 2.0
|
||||
y += 3.0 if (branch + step) % 2 == 0 else -3.0
|
||||
crack.append(Vector2(x, y).round())
|
||||
draw_polyline(crack, Color(0.08, 0.06, 0.14, fade), 5.0)
|
||||
draw_polyline(crack, Color(0.68, 0.50, 0.93, fade * 0.7), 1.0)
|
||||
var split: Vector2 = crack[3] + Vector2(side * 10.0, -10.0)
|
||||
draw_line(crack[2], split, Color(0.12, 0.09, 0.20, fade), 3.0)
|
||||
_draw_debris(progress, 12, Color(0.57, 0.52, 0.64, fade), radius * 0.7)
|
||||
|
||||
|
||||
## Hector: frentes de sonido concentricos; el grito sigue usando el dano de area comun.
|
||||
func _draw_vocal_wave(progress: float, fade: float) -> void:
|
||||
var reach: float = lerpf(9.0, radius, progress)
|
||||
for index: int in range(3):
|
||||
var ratio: float = 1.0 - float(index) * 0.19
|
||||
_draw_ring(reach * ratio, 0.85, Color(1.0, 0.86, 0.25, fade * (0.85 - float(index) * 0.16)), 3.0)
|
||||
|
||||
|
||||
## Ivan: platos que vuelan y giran en todas direcciones. Son dibujo, no proyectiles.
|
||||
## El dano lo aplica Player una sola vez por pulso, nunca por contacto con estos platos.
|
||||
func _draw_drum_cymbals(progress: float, fade: float) -> void:
|
||||
for index: int in range(10):
|
||||
var angle: float = TAU * float(index) / 10.0
|
||||
var travel: float = lerpf(14.0, radius, progress)
|
||||
var point := Vector2(cos(angle), sin(angle) * 0.78) * travel
|
||||
var wobble: float = 0.30 + absf(sin(progress * TAU * 2.0 + angle)) * 0.35
|
||||
draw_set_transform(point.round(), angle + progress * 5.0, Vector2(1.0, wobble))
|
||||
draw_circle(Vector2.ZERO, 12.0, Color(0.34, 0.21, 0.06, fade))
|
||||
draw_circle(Vector2.ZERO, 10.0, Color(0.92, 0.65, 0.17, fade))
|
||||
_draw_ring(8.0, 1.0, Color(1.0, 0.89, 0.45, fade), 1.0)
|
||||
draw_circle(Vector2.ZERO, 3.0, Color(1.0, 0.94, 0.65, fade))
|
||||
draw_circle(Vector2.ZERO, 1.0, Color(0.20, 0.15, 0.05, fade))
|
||||
draw_set_transform(Vector2.ZERO, 0.0, Vector2.ONE)
|
||||
|
||||
|
||||
## Fer: ondas graves gruesas. La vibracion de camara se sincroniza con estos pulsos.
|
||||
func _draw_bass_pulse(progress: float, fade: float) -> void:
|
||||
var reach: float = lerpf(8.0, radius, progress)
|
||||
_draw_ring(reach, 0.65, Color(0.64, 0.42, 0.97, fade * 0.65), 7.0)
|
||||
_draw_ring(reach * 0.83, 0.65, Color(0.91, 0.76, 1.0, fade * 0.8), 2.0)
|
||||
for index: int in range(8):
|
||||
var angle: float = TAU * float(index) / 8.0
|
||||
var point := Vector2(cos(angle), sin(angle) * 0.65) * reach
|
||||
_draw_note(point.round(), Color(0.83, 0.66, 1.0, fade))
|
||||
Reference in new issue
Block a user