16 lines
377 B
GDScript
16 lines
377 B
GDScript
extends Spatial
|
|
|
|
func _process(_delta):
|
|
# Event key "escape" and "godot event" ui_end
|
|
if Input.is_action_just_pressed("ui_end"):
|
|
_quit_to_menu()
|
|
|
|
func _notification(what):
|
|
# Notification for android back action
|
|
if what == MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST:
|
|
_quit_to_menu()
|
|
|
|
# Back to main scene
|
|
func _quit_to_menu():
|
|
Global.goto_scene("res://scenes/main.tscn")
|