16 lines
637 B
GDScript3
16 lines
637 B
GDScript3
|
|
extends Node2D
|
||
|
|
|
||
|
|
# Visual-only craft-to-mothership flight. GameState owns position/progress;
|
||
|
|
# this node just renders a finished hull headed toward the hangar.
|
||
|
|
var vessel_type: String = GameState.VESSEL_INTERCEPTOR
|
||
|
|
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
z_index = -1
|
||
|
|
queue_redraw()
|
||
|
|
|
||
|
|
|
||
|
|
func _draw() -> void:
|
||
|
|
var color: Color = Color(0.45, 0.8, 1.0) if vessel_type == GameState.VESSEL_SHIELD else Color(0.95, 0.55, 0.85) if vessel_type == GameState.VESSEL_TRANSPORTER else Color(0.25, 0.85, 1.0)
|
||
|
|
var hull := PackedVector2Array([Vector2(0, -20), Vector2(13, 15), Vector2(0, 9), Vector2(-13, 15)])
|
||
|
|
NeonDraw.draw_glowing_polygon(self, hull, color, 1.0)
|