Refactor multi-resource UI and transfers
This commit is contained in:
parent
af5e08e5a1
commit
8231e165ff
20 changed files with 648 additions and 435 deletions
|
|
@ -18,4 +18,20 @@ func _process(delta: float) -> void:
|
|||
progress = 0.0
|
||||
func _draw() -> void:
|
||||
for vent in vents:
|
||||
NeonDraw.draw_glowing_polygon(self, PackedVector2Array([vent+Vector2(0,-44),vent+Vector2(38,-22),vent+Vector2(38,22),vent+Vector2(0,44),vent+Vector2(-38,22),vent+Vector2(-38,-22)]), Color(0.85,0.52,1),0.8,Color(0.15,0.03,0.22),0.5)
|
||||
_draw_gas_source(vent)
|
||||
|
||||
|
||||
func _draw_gas_source(centre: Vector2) -> void:
|
||||
var colour := Color(0.85, 0.52, 1.0)
|
||||
var core := Color(0.15, 0.03, 0.22)
|
||||
var bubbles: Array = [
|
||||
[centre + Vector2(-20.0, 8.0), 20.0],
|
||||
[centre + Vector2(18.0, 14.0), 27.0],
|
||||
[centre + Vector2(17.0, -22.0), 15.0],
|
||||
]
|
||||
for bubble in bubbles:
|
||||
var ring := PackedVector2Array()
|
||||
for i in range(12):
|
||||
var angle: float = TAU * float(i) / 12.0
|
||||
ring.append(bubble[0] + Vector2(cos(angle), sin(angle)) * float(bubble[1]))
|
||||
NeonDraw.draw_glowing_polygon(self, ring, colour, 0.9, core, 0.6)
|
||||
|
|
|
|||
Loading…
Reference in a new issue