spaceship/tests/_artillery_telegraph_rocky_preview.gd

20 lines
697 B
GDScript3
Raw Normal View History

extends Node2D
func _ready() -> void:
GameState.planet_name = "Kepler's Rest"
GameState.planet_id = "artillery_preview_rocky"
GameState.planet_definition_id = "rocky"
GameState.surviving_ship_count = 3
var surface: Node = load("res://PlanetSurface.tscn").instantiate()
surface.get_node("SurfaceController").fade_duration = 0.0
add_child(surface)
var shell: Node = load("res://ArtilleryShell.tscn").instantiate()
shell.telegraph_time = 10.0 # frozen mid-countdown for the screenshot
shell.aoe_radius = 220.0
surface.add_child(shell)
shell.launch(Vector2(-600, -600), Vector2.ZERO)
shell.telegraph_left = shell.telegraph_time * 0.45
shell.set_process(false)
shell.queue_redraw()