예제 #1
0
        public void ShowSelectServerInfo()
        {
            GameServerData.ServerInfo info = GameServerData.Instance.CurSelectServerInfo;
            mPlayNameLabel.text = info.name;
            var pair = GameServerData.StateDescrption[(int)info.state];

            mPlayStateLabel.text  = "(" + pair.Key + ")";
            mPlayStateLabel.color = pair.Value;
        }
예제 #2
0
        // 开始游戏
        public void StartGame()
        {
            GameServerData.ServerInfo info = GameServerData.Instance.CurSelectServerInfo;
            NetworkManager.Instance.Configure(info.address, info.port);

            NetworkManager.Instance.OnConnectServerSuccess += OnConnectBSSuccess;

            NetworkManager.Instance.EnableConnect = true;
            PlayerPrefs.SetString(GameServerData.ServerKey, info.name);
        }