Multiplayer connects but needs to load players and finish setup checks.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
extends Control
|
||||
|
||||
var host : bool
|
||||
|
||||
var handle : String
|
||||
func _on_host_game_button_pressed() -> void:
|
||||
%Menu.visible = false
|
||||
%Hosting.visible = true
|
||||
@@ -19,10 +19,17 @@ func _on_menu_back_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_start_hosting_button_pressed() -> void:
|
||||
var host_name = %HostHandle.text
|
||||
if len(host_name) < 3:
|
||||
return
|
||||
handle = host_name
|
||||
Multiplayer.handle = handle
|
||||
#Validate entries
|
||||
%Hosting.visible = false
|
||||
#Set fields
|
||||
%ParticipantsText.text = "[color=FFFF00]*%s (HOST)[/color]\n" % handle
|
||||
%"Host Waiting".visible = true
|
||||
Multiplayer.become_host()
|
||||
|
||||
|
||||
func _on_hosting_back_button_pressed() -> void:
|
||||
@@ -43,10 +50,15 @@ func _on_waiting_back_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_join_button_pressed() -> void:
|
||||
var host_name = %JoinHandle.text
|
||||
if len(host_name) < 3:
|
||||
return
|
||||
handle = host_name
|
||||
#Check for valid game
|
||||
#If found
|
||||
%Joining.visible = false
|
||||
%"Host Waiting".visible = true
|
||||
if Multiplayer.join_game(handle):
|
||||
%"Host Waiting".visible = true
|
||||
|
||||
|
||||
func _on_joining_back_button_pressed() -> void:
|
||||
|
||||
Reference in New Issue
Block a user