Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
ファイル: LoginUi.cs プロジェクト: gamemachine/gamemachine
 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);
 }
コード例 #2
0
ファイル: App.cs プロジェクト: tiger0-0/gamemachine
        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();
        }