Limited Space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
ld54/scripts/ui/change_scene_button.gd

12 lines
272 B

extends Button
class_name SceneChanger
@export_file("*.tscn") var TARGET_SCENE;
@export var reset_gamestate = false
func _pressed():
print("Changing scene to: " + TARGET_SCENE)
get_tree().change_scene_to_file(TARGET_SCENE)
if reset_gamestate:
g_game_state.reset()