示例#1
0
    void ActivateChat(int friendIdx)
    {
        // deactivate old friend
        //FriendInfo info = GetFriendInfo(m_ActiveFriend);
        m_Chat.Channel = null;
        m_Chat.Clear();

        // store new friend index
        m_ActiveFriend = friendIdx;

        // activate old friend
        FriendInfo info = GetFriendInfo(m_ActiveFriend);

        if (info != null)
        {
            m_Chat.Channel  = info.Channel;
            m_Chat.Messages = info.Messages.Data;
        }
    }
示例#2
0
    void LeaveGang(string master)
    {
        if (string.IsNullOrEmpty(m_Master) == true)
        {
            return;
        }
        if (m_Master != master)
        {
            return;
        }

        m_Chat.Channel = null;
        m_Chat.Clear();

        m_Master    = null;
        m_IsReady   = false;
        m_IsJoining = false;
        m_Friends   = new FriendInfo[0];

        SetDirty();
    }