on game close godot code example Example 1: godot close game get_tree().quit() Example 2: godot exit game get_tree().quit()