Randoloot/tests/previews/freighter_warp_preview.gd
2026-10-25 16:12:08 +01:00

16 lines
655 B
GDScript

extends Control
func _ready() -> void:
var effect := preload("res://scripts/game/freighter_warp_departure.gd").new()
effect.start_position = Vector2(640,440)
effect.destination_name = "Odległy sektor 120"
add_child(effect)
effect.set_process(false)
for phase in [["charge",0.65],["acceleration",2.35],["entry",2.95],["flash",3.15]]:
effect.elapsed = phase[1]
effect._update_frame()
await get_tree().process_frame
await RenderingServer.frame_post_draw
get_viewport().get_texture().get_image().save_png("res://artifacts/freighter_warp_%s.png" % phase[0])
print("FREIGHTER_WARP_PREVIEW_OK: charge, acceleration, entry and flash captured")