bcirpggithubmirror/Phase2/Godot ===(Game Code)===/Experiments/Andrew_Multiplayer_Test/Room_Join.gd
Andrew Tang ac73e184d3 Adjustments to Multiplayer Test
Added a join scene but was unable to get the client-server interaction working properly. Hopefully some of the code can be used as a starting point once we begin working on Dario's UI.
2022-08-22 02:56:29 +08:00

14 lines
525 B
GDScript

extends Control
onready var multiplayer_config_ui = $Multiplayer_Configure
onready var server_ip_address = $Multiplayer_Configure/Server_IP_Address
onready var room_password = $Multiplayer_Configure/Room_Password
onready var player_name = $Multiplayer_Configure/Player_Name
func _on_Join_Server_pressed():
if server_ip_address.text != "":
multiplayer_config_ui.hide()
Network.ip_address = server_ip_address.text
Network._join_server()
Network._instance_player(get_tree().get_network_unique_id(), player_name.text)