mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-15 05:25:57 +00:00
Fix title screen never going (whoops
This commit is contained in:
parent
bf58a2b29e
commit
34d0b1bf0d
@ -38,29 +38,33 @@ func _input(event):
|
|||||||
# Ensure the scene doesn't become empty
|
# Ensure the scene doesn't become empty
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
# Make sure there's something running
|
# Make sure there's something running
|
||||||
|
# Background counts as one child
|
||||||
# Debug counts as one child
|
# Debug counts as one child
|
||||||
if get_child_count() < 1 + int(debug_enabled):
|
if get_child_count() < 2 + int(debug_enabled):
|
||||||
MessageBus.emit_signal("change_scene", "Title")
|
MessageBus.emit_signal("change_scene", "Title")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Creates a new instance of each menu scene
|
# Creates a new instance of each menu scene
|
||||||
func _on_scene_start(scene):
|
func _on_scene_start(scene):
|
||||||
|
var instance
|
||||||
#print ("_on_scene_start(",scene,")")
|
#print ("_on_scene_start(",scene,")")
|
||||||
match scene:
|
match scene:
|
||||||
"Singleplayer":
|
"Singleplayer":
|
||||||
add_child (Game.instance())
|
instance = Game.instance()
|
||||||
|
add_child (instance)
|
||||||
return true
|
return true
|
||||||
"Multiplayer":
|
"Multiplayer":
|
||||||
var game = Game.instance()
|
instance = Game.instance()
|
||||||
game.is_multiplayer = true
|
instance.is_multiplayer = true
|
||||||
add_child (game)
|
add_child (instance)
|
||||||
# add_child (multiplayercontroller.instance())
|
|
||||||
return true
|
return true
|
||||||
"Options":
|
"Options":
|
||||||
add_child (Options.instance())
|
instance = Options.instance()
|
||||||
|
add_child (instance)
|
||||||
return true
|
return true
|
||||||
"Title":
|
"Title":
|
||||||
add_child (Title_Screen.instance())
|
instance = Title_Screen.instance()
|
||||||
|
add_child (instance)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func _on_scene_start_by_name(scene):
|
func _on_scene_start_by_name(scene):
|
||||||
|
Loading…
Reference in New Issue
Block a user