extends Control func _init(): WebsocketController.connect("hostjoin", self, "_on_hostjoin") func _ready(): WebsocketController.connect_websocket() func _on_hostjoin(): var location = JavaScript.get_interface("location") if location and location.hash != "": WebsocketController.join_game(location.hash) else: WebsocketController.host_game()