Add loading when load warcraft scene
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
extends Spatial
|
||||
|
||||
export (PackedScene) var main = load("res://scenes/main.tscn")
|
||||
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):
|
||||
# Back to main scene
|
||||
# Notification for android back action
|
||||
if what == MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST:
|
||||
var scene = main.instance()
|
||||
call_deferred("add_child", scene)
|
||||
_quit_to_menu()
|
||||
|
||||
# Back to main scene
|
||||
func _quit_to_menu():
|
||||
Global.goto_scene("res://scenes/main.tscn")
|
||||
|
||||
Reference in New Issue
Block a user