using GeoSus.Client; using System.Threading.Tasks; using UnityEngine; namespace Subsystems { public class GameManager_Network { private const string _serverAddress = "geosus.honzuvkod.dev"; private const int _serverPort = 7777; private GameClient _gameClient; public async void checkState() { while (true) { Task state = _gameClient.ConnectAsync(_serverAddress, _serverPort); await state; if (state.Result) { Debug.Log("Connected to server."); _gameClient.Disconnect(); } else { Debug.Log("Failed to connect to server"); } await Task.Delay(5000); } } public GameManager_Network(GameClient gameClient) { _gameClient = gameClient; } } }