Kept goiong, but not quite happy.
This commit is contained in:
+11
-3
@@ -1,5 +1,5 @@
|
||||
extends Control
|
||||
|
||||
extends CanvasLayer
|
||||
var mainScene
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@@ -16,5 +16,13 @@ func _on_quit():
|
||||
get_tree().quit()
|
||||
|
||||
func _on_play():
|
||||
get_tree().change_scene_to_file("res://scenes/main.tscn")
|
||||
$".".hide()
|
||||
var w = get_node("/root/World");
|
||||
|
||||
if !w:
|
||||
get_tree().change_scene_to_file( "res://scenes/main.tscn" )
|
||||
else:
|
||||
w.load_level()
|
||||
w.player_spawn()
|
||||
w.show()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user