public Mudclient(string ip, int port) : base(ip, port) { Instance = this; MobManager.MyPlayer = new Player(); _pinger = new Timer(); _pinger.Interval = 500; _pinger.Elapsed += _pinger_Elapsed; _gameUpdater = new Timer(); _gameUpdater.Interval = 100; _gameUpdater.Elapsed += _gameUpdater_Elapsed; }
public void LoginClick() { var user = gameObject.Find <InputField>("InputUsername"); var pass = gameObject.Find <InputField>("InputPassword"); if (Client == null) { Client = new Mudclient(Server_IP, Server_Port); Client.OnDisplayLoginMessage += Client_OnDisplayLoginMessage; Client.OnConnectSuccess += Client_OnConnectSuccess; Client.OnConnectFailed += Client_OnConnectFailed; } username = user.text; password = pass.text; Client.connect(username, password, false); }