pegchamp/Menu/Buttons/LevelSelectIconButton.gd
2021-09-28 17:55:03 +02:00

12 lines
333 B
GDScript

extends TextureButton
export var scene = "res://Menu/MainMenu.tscn"
func _on_LevelSelectIconButton_pressed():
disabled = true
var main = get_tree().current_scene
var Fadeout = load("res://Effects/FadeOut.tscn")
var fadeout = Fadeout.instance()
fadeout.scene_to_load = scene
main.add_child(fadeout)
get_tree().paused = false