12345678910111213141516171819202122232425262728293031323334 |
- extends Node
- # Declare member variables here. Examples:
- # var a = 2
- # var b = "text"
- var camera
- var camera_parent
- # Called when the node enters the scene tree for the first time.
- func _ready():
- camera = find_node("camera")
- camera_parent = get_node("planet1/planet")
- camera.get_parent().remove_child(camera)
- camera_parent.add_child(camera)
- pass # Replace with function body.
- func _on_ItemList_item_selected(index):
- if index == 0:
- camera_parent.remove_child(camera)
- camera_parent = get_node("Sun")
- camera_parent.add_child(camera)
- if index == 1:
- camera_parent.remove_child(camera)
- camera_parent = get_node("planet1/planet")
- camera_parent.add_child(camera)
- if index == 2:
- camera_parent.remove_child(camera)
- camera_parent = get_node("planet2/planet")
- camera_parent.add_child(camera)
-
- pass # Replace with function body.
|