extends Node

## Autoload Demo: Scene A

func _ready():
	# Display the ACTUAL global score
	$Label.text = "Counter (Scene A): %d" % Global.current_score
	
	$IncrementBtn.pressed.connect(_on_increment)
	$ChangeSceneBtn.pressed.connect(_on_change_scene)

func _on_increment():
	# Modify the REAL global singleton
	Global.current_score += 1
	$Label.text = "Counter (Scene A): %d" % Global.current_score

func _on_change_scene():
	get_tree().change_scene_to_file("res://scenes/lecture/autoload_demo_2.tscn")
