extends Node


# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var camera

# Called when the node enters the scene tree for the first time.
func _ready():
	camera = find_node("camera_mover")
	pass # Replace with function body.



func _on_ItemList_item_selected(index):
	if index == 2:
		camera.get_parent().remove_child(camera)
		get_node("planet2/planet2").add_child(camera)
		get_node("the_real_camera").set_target(get_node("planet2/planet2/camera_mover/helper/camera"))
	if index == 1:
		camera.get_parent().remove_child(camera)
		get_node("planet/planet").add_child(camera)
		get_node("the_real_camera").set_target(get_node("planet/planet/camera_mover/helper/camera"))
	if index == 0:
		camera.get_parent().remove_child(camera)
		get_node("sun").add_child(camera)
		get_node("the_real_camera").set_target(get_node("sun/camera_mover/helper/camera"))
	pass # Replace with function body.
