godot-third-person-basic-scene/maps/environments/khanat_environment.gd

22 lines
843 B
GDScript

extends Environment
class_name khanat_environment
@export var celestial_positions: Dictionary
func _ready():
celestial_positions = get_celestial_coordinates()
print("Celestial positions : %s" %celestial_positions)
func get_celestial_coordinates():
var stigi_pos = sky.sky_material.get_shader_param("stigi_position")
var stigi_arc = sky.sky_material.get_shader_param("stigi_arc")
var samayun_pos = sky.sky_material.get_shader_param("samayun_position")
var samayun_arc = sky.sky_material.get_shader_param("samayun_arc")
var zabr_pos = sky.sky_material.get_shader_param("zabr_position")
var zabr_arc = sky.sky_material.get_shader_param("zabr_arc")
var positions = {"stigi_pos":stigi_pos, "stigi_arc":stigi_arc, "samayun_pos":samayun_pos, "samayun_arc":samayun_arc, "zabr_pos":zabr_pos, "zabr_arc":zabr_arc}
return positions