2024-03-16 02:36:45 +01:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
|
|
@onready var lobby_code_input = $PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/LobbyCodeInput
|
|
|
|
|
|
|
|
|
|
func _ready():
|
2024-03-23 16:18:30 +01:00
|
|
|
#WSClient.lobby_joined.connect(_on_lobby_joined)
|
|
|
|
|
pass
|
2024-03-16 02:36:45 +01:00
|
|
|
|
|
|
|
|
func _on_lobby_joined(lobby: String) -> void:
|
|
|
|
|
GameData.lobby_code = lobby
|
|
|
|
|
|
|
|
|
|
get_tree().change_scene_to_file("res://Multiplayer/Multiplayer.tscn")
|
|
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
func _on_back_button_pressed():
|
|
|
|
|
get_tree().change_scene_to_file("res://main_menu.tscn")
|
|
|
|
|
|
|
|
|
|
func _on_connect_button_pressed():
|
|
|
|
|
GameData.is_player_black = true
|
2024-03-23 16:18:30 +01:00
|
|
|
#WSClient.start(GameData.WEBSOCKET_ENDPOINT, lobby_code_input.text, false)
|
|
|
|
|
pass
|