void Start() { windowWidth = 500; windowHeight = 250; windowLeft = (Screen.width / 2) - windowWidth / 2; windowTop = (Screen.height / 2) - windowHeight / 2; loginWindow = new Rect (windowLeft, windowTop, windowWidth, windowHeight); login = this.gameObject.AddComponent<Login> () as Login; login.SetLoginUi (this); }
public void Run(Login.Protocol protocol, string host, int port, string username, int authtoken) { App.protocol = protocol; // Create client and start actor system if (protocol == GameMachine.Login.Protocol.UDP) { client = new AsyncUdpClient(host, port, username, authtoken); } else { client = new AsyncTcpClient(host, port, username, authtoken); } client.Start(); ConnectLoop(); }