36 lines
1.9 KiB
GDScript
36 lines
1.9 KiB
GDScript
extends Node2D
|
|
## Decorado vectorial temporal: cielo, ruinas, antorchas y camara de la Muerte.
|
|
## Sin sprites externos: el equipo de arte puede reemplazar este nodo completo.
|
|
|
|
func _process(_delta: float) -> void:
|
|
queue_redraw()
|
|
|
|
func _draw() -> void:
|
|
var t: float = Time.get_ticks_msec() * 0.001
|
|
# Ventanas de la ciudad y luminarias del camino.
|
|
for i: int in range(11):
|
|
var x: float = 140.0 + i * 268.0
|
|
var h: float = 240.0 + (i % 4) * 55.0
|
|
draw_rect(Rect2(x, 620.0 - h, 120, h), Color(0.105, 0.095, 0.15))
|
|
for row: int in range(3):
|
|
draw_rect(Rect2(x + 24, 435 - h + row * 68, 16, 24), Color(0.61, 0.27, 0.19, 0.55))
|
|
draw_line(Vector2(x + 8, 620), Vector2(x + 8, 470), Color(0.23, 0.23, 0.31), 7)
|
|
draw_circle(Vector2(x + 8, 466), 13, Color(0.9, 0.45, 0.14, 0.45 + 0.1 * sin(t * 4 + i)))
|
|
# Flechas de descenso y marco de piedra para el umbral.
|
|
for i: int in range(3):
|
|
var y: float = 770 + i * 120
|
|
draw_colored_polygon(PackedVector2Array([Vector2(3150, y), Vector2(3220, y), Vector2(3185, y + 38)]), Color(0.75, 0.23, 0.42, 0.7))
|
|
draw_rect(Rect2(3040, 470, 28, 240), Color(0.27, 0.22, 0.31))
|
|
draw_rect(Rect2(3095, 470, 28, 240), Color(0.27, 0.22, 0.31))
|
|
draw_rect(Rect2(3040, 445, 84, 32), Color(0.37, 0.27, 0.39))
|
|
# Cripta: columnas, arco, luna ensangrentada y antorchas.
|
|
draw_circle(Vector2(3790, 890), 64, Color(0.69, 0.18, 0.23, 0.35))
|
|
for x: float in [3340.0, 3520.0, 4030.0, 4240.0]:
|
|
draw_rect(Rect2(x, 965, 35, 305), Color(0.22, 0.18, 0.29))
|
|
draw_rect(Rect2(x - 12, 953, 58, 22), Color(0.33, 0.25, 0.37))
|
|
draw_rect(Rect2(x - 12, 1248, 58, 24), Color(0.33, 0.25, 0.37))
|
|
draw_circle(Vector2(x + 18, 1030), 14, Color(0.95, 0.29, 0.30, 0.35 + 0.1 * sin(t * 5 + x)))
|
|
draw_arc(Vector2(3780, 1040), 240, PI, TAU, 36, Color(0.36, 0.24, 0.42), 18)
|
|
for x: int in range(3320, 4300, 110):
|
|
draw_line(Vector2(x, 1259), Vector2(x + 40, 1249), Color(0.49, 0.29, 0.38, 0.55), 3)
|