extends Control

func _ready():
	$buttons/return.connect("pressed", self, "finish")
	$buttons/upgrade.connect("pressed", self, "upgrade")
	$buttons/teleport_to_town.connect("pressed", self, "teleport")
	set_physics_process(false)
func finish():
	controls.is_gui = false
	hide()
func upgrade():
	controls.is_gui = false
	hide()
	scenario.camp_level += 1
	scenario.camp.queue_free()
	scenario.camp = streaming.setup_bandit_camp(scenario.camp_site)
func teleport():
	set_physics_process(true)

func _physics_process(delta):
	var cam = get_viewport().get_camera()
	if cam:
		var player = cam.get_meta("player")
		player.global_transform.origin = scenario.camp.global_transform.origin + Vector3(0, 10, 0)
		set_physics_process(false)
