extends Button


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


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
	pass
	
var nestedGameInstance

func _on_pressed():
	print("RT button press")
	var baseScene = get_parent().get_parent()
	
	var nestedGameScene = preload("res://MiniGames/RingToss/ringtoss_scene.tscn")
	nestedGameInstance = nestedGameScene.instantiate()
	add_child(nestedGameInstance)
	
	nestedGameInstance.get_node("RTcam").make_current()
	
	#baseScene.pauseScene() # dosnt work cause it also pauses the new scene since its a child
	
