Main initiates lobby now.
This commit is contained in:
parent
94302003d8
commit
24d8ea3210
|
|
@ -45,6 +45,7 @@ usage = 0
|
|||
render_target_update_mode = 3
|
||||
|
||||
[node name="Lobby" parent="ViewportContainer/Viewport" instance=ExtResource( 9 )]
|
||||
visible = false
|
||||
|
||||
[node name="SceneTransition" parent="ViewportContainer/Viewport" instance=ExtResource( 4 )]
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ export var start_screen: PackedScene
|
|||
|
||||
onready var viewport_container = $ViewportContainer
|
||||
onready var viewport = $"%Viewport"
|
||||
onready var lobby = $ViewportContainer/Viewport/Lobby
|
||||
|
||||
|
||||
var game_size :Vector2
|
||||
onready var window_scale :float
|
||||
|
|
@ -26,6 +28,12 @@ func _ready():
|
|||
window_scale = (OS.window_size / game_size).x
|
||||
assert(starting_level != null, "Main: starting level not specified.")
|
||||
assert(player_hud != null, "Main: player HUD not specified.")
|
||||
assert(is_instance_valid(lobby), "Main: No lobby scene found.")
|
||||
|
||||
##TODO: Once a start screen is there, go there instead of lobby UI.
|
||||
# Or shift this over to UIManager singleton
|
||||
if is_instance_valid(start_screen) == false:
|
||||
lobby.visible = true
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user