Пример #1
0
    void ConnectToJiver()
    {
        if (UserMgr.Schedule != null)
        {
            Debug.Log("Connecting");
            ClearList();
            Debug.Log("Cleared");
            string appId = "1C0C2894-E73D-4711-B9A0-A55C2C4DEBF6";
            //		string userId = SystemInfo.deviceUniqueIdentifier;
            string userName = UserMgr.UserInfo.memberName;
            string userId   = userName;
            //		string channelUrl = DEFAULT_CHANNEL;

            Jiver.Init(appId);
            Debug.Log("Init");
            Jiver.Login(userId, userName);
            Debug.Log("Login");
            string channelUrl1 = DEFAULT_CHANNEL
                                 + UserMgr.Schedule.extend [0].teamCode + UserMgr.Schedule.extend [1].teamCode;
            string channelUrl2 = DEFAULT_CHANNEL
                                 + UserMgr.Schedule.extend [1].teamCode + UserMgr.Schedule.extend [0].teamCode;
            Debug.Log(channelUrl1 + "," + channelUrl2);
            Jiver.Join(channelUrl1, channelUrl2);
            Debug.Log("Join");
            Jiver.QueryChannelList(false);
            Debug.Log("List");
        }
    }
Пример #2
0
    void DrawTabs(float width, float height)
    {
        if (GUI.Button(new Rect(0, 0, width * 0.5f, height), channelName))
        {
            tabMode = TAB_MODE.CHAT;
        }

        if (GUI.Button(new Rect(width * 0.5f, 0, width * 0.5f, height), "Channels"))
        {
            if (tabMode == TAB_MODE.CHAT)
            {
                tabMode = TAB_MODE.CHANNEL;
                Jiver.QueryChannelList();
            }
            else
            {
                tabMode = TAB_MODE.CHAT;
            }
        }
    }
Пример #3
0
 void OpenChannelList()
 {
     channelPanel.SetActive(true);
     Jiver.QueryChannelList();
 }