hurrmmm/godot/Button.gd

9 lines
156 B
GDScript

extends Button
func _on_pressed():
get_tree().change_scene_to_file("res://main.tscn")
func _input(event):
if event.is_action("charge"):
_on_pressed()