2021-05-08 20:38:16 +02:00
|
|
|
extends Spatial
|
|
|
|
|
|
2021-05-09 17:10:40 +02:00
|
|
|
func _process(_delta):
|
|
|
|
|
# Event key "escape" and "godot event" ui_end
|
|
|
|
|
if Input.is_action_just_pressed("ui_end"):
|
|
|
|
|
_quit_to_menu()
|
2021-05-08 20:38:16 +02:00
|
|
|
|
|
|
|
|
func _notification(what):
|
2021-05-09 17:10:40 +02:00
|
|
|
# Notification for android back action
|
2021-05-08 20:38:16 +02:00
|
|
|
if what == MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST:
|
2021-05-09 17:10:40 +02:00
|
|
|
_quit_to_menu()
|
|
|
|
|
|
|
|
|
|
# Back to main scene
|
|
|
|
|
func _quit_to_menu():
|
|
|
|
|
Global.goto_scene("res://scenes/main.tscn")
|