godot-third-person-basic-scene/scenes/developper/sky_panel.gd
2022-04-18 21:58:12 +02:00

12 lines
702 B
GDScript

extends VBoxContainer
func _ready():
# Get the initial positions of celestial objects from shader paramaters
# to display them in proper panel
var positions = get_parent().get_parent().get_parent().get_parent().get_node("terrain_basic_setup").get_celestial_coordinates()
for planet in ["stigi", "zabr","samayun"]:
get_node("%s_panel/data_panel/%s_pos" %[planet, planet]).text = "%s :\n - X %2f\n - Y %2f\n - Z %2f" % [tr("lab_position"), positions["%s_pos" %[planet]][0], positions["%s_pos" %[planet]][1], positions["%s_pos" %[planet]][2]]
get_node("%s_panel/data_panel/%s_arc" %[planet, planet]).text = "%s : %s" % [tr("lab_size"), positions["%s_arc" %[planet]]]
func _process(delta):
pass