Add method for quit war scene and back to main

This commit is contained in:
VAILLANT Jeremy
2021-05-08 20:38:16 +02:00
parent ec277ff2c0
commit 54833d8f78
3 changed files with 15 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
extends Spatial
export (PackedScene) var main = load("res://scenes/main.tscn")
func _notification(what):
# Back to main scene
if what == MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST:
var scene = main.instance()
call_deferred("add_child", scene)