Наследование: global::ProtoBuf.IExtensible
Пример #1
0
    public static void RefresServer(ArrayList aServerList)
    {
        for (int i = 0; i <= (int)WSERVERLIST_CONTROL_ENUM.WSLC_SERVER9 - (int)WSERVERLIST_CONTROL_ENUM.WSLC_SERVER0; i++)
        {
            if (i < aServerList.Count)
            {
                NFMsg.ServerInfo info = (NFMsg.ServerInfo)aServerList[i];
                if (null != info)
                {
                    GameObject go = (GameObject)mhtWindow[(WSERVERLIST_CONTROL_ENUM)(i + (int)WSERVERLIST_CONTROL_ENUM.WSLC_SERVER0)];
                    if (null != go)
                    {
                        go.SetActive(true);

                        int        j     = i + (int)WSERVERLIST_CONTROL_ENUM.WSLC_SERVER_LBL0;
                        GameObject goLbl = (GameObject)mhtWindow[(WSERVERLIST_CONTROL_ENUM)j];
                        if (null != goLbl)
                        {
                            goLbl.SetActive(true);
                            goLbl.GetComponent <Text>().text = System.Text.Encoding.Default.GetString(info.name);
                        }
                    }
                }
            }
            else
            {
                GameObject go = (GameObject)mhtWindow[(WSERVERLIST_CONTROL_ENUM)(i + (int)WSERVERLIST_CONTROL_ENUM.WSLC_SERVER0)];
                if (null != go)
                {
                    go.SetActive(false);
                }
            }
        }
    }
Пример #2
0
    void OnGroupClick(GameObject go)
    {
        switch (eControlType)
        {
        case WSERVERLIST_CONTROL_ENUM.WSLC_AREA1:
        case WSERVERLIST_CONTROL_ENUM.WSLC_AREA2:
        case WSERVERLIST_CONTROL_ENUM.WSLC_AREA3:
        case WSERVERLIST_CONTROL_ENUM.WSLC_AREA4:
        {
            int             i    = eControlType - WSERVERLIST_CONTROL_ENUM.WSLC_AREA1;
            NFNetController xNet = NFNetController.Instance;
            if (xNet.aWorldList.Count >= i)
            {
                NFMsg.ServerInfo info = (NFMsg.ServerInfo)xNet.aWorldList[i];
                if (null != info)
                {
                    NFNetController.Instance.mxNetSender.RequireConnectWorld(info.server_id);
                }
            }
        }
        break;

        default:
            break;
        }
    }
Пример #3
0
    void OnServerClick(GameObject go)
    {
        switch (eControlType)
        {
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER0:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER1:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER2:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER3:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER4:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER5:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER6:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER7:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER8:
        case WSERVERLIST_CONTROL_ENUM.WSLC_SERVER9:
        {
            int             i    = eControlType - WSERVERLIST_CONTROL_ENUM.WSLC_SERVER0;
            NFNetController xNet = NFNetController.Instance;
            if (xNet.aServerList.Count >= i)
            {
                NFMsg.ServerInfo info = (NFMsg.ServerInfo)xNet.aServerList[i];
                if (null != info)
                {
                    NFNetController.Instance.nServerID = info.server_id;
                    NFNetController.Instance.mxNetSender.RequireSelectServer(info.server_id);
                }
            }
        }
        break;

        default:
            break;
        }
    }
Пример #4
0
        public void OnServerList(int eventId, NFDataList valueList)
        {
            ArrayList serverList = mGameServerList;

            Debug.Log("OnServerList:" + serverList.Count);

            if (autoReconnectGameID > 0)
            {
                RequireSelectServer(autoReconnectGameID);
            }
            else
            {
                System.Random    rd    = new System.Random();
                int              index = rd.Next(0, serverList.Count);
                NFMsg.ServerInfo info  = (ServerInfo)serverList[index];

                RequireSelectServer(0);
            }

            autoReconnectGameID = 0;
        }
Пример #5
0
 private void OnGameServerClick(NFMsg.ServerInfo info)
 {
     NFCLoginLogic.Instance().RequireSelectServer(info.server_id);
 }
Пример #6
0
 // UI Event
 private void OnWorldServerClick(NFMsg.ServerInfo info)
 {
     NFCLoginLogic.Instance().RequireConnectWorld(info.server_id);
 }
Пример #7
0
 private void OnGameServerClick(NFMsg.ServerInfo info)
 {
     mLoginModule.RequireSelectServer(info.server_id);
 }
Пример #8
0
 // UI Event
 private void OnWorldServerClick(NFMsg.ServerInfo info)
 {
     mLoginModule.RequireConnectWorld(info.server_id);
 }