/// <summary> /// New status of another user (you get updates for users set in your friends list). /// </summary> /// <param name="user">Name of the user.</param> /// <param name="status">New status of that user.</param> /// <param name="gotMessage">True if the status contains a message you should cache locally. False: This status update does not include a /// message (keep any you have).</param> /// <param name="message">Message that user set.</param> public void OnStatusUpdate(string user, int status, bool gotMessage, object message) { Debug.LogWarning("status: " + string.Format("{0} is {1}. Msg:{2}", user, status, message)); if (this.friendListItemLUT.ContainsKey(user)) { FriendItem _friendItem = this.friendListItemLUT[user]; if (_friendItem != null) { _friendItem.OnFriendStatusUpdate(status, gotMessage, message); } } }
private void InstantiateFriendButton(string friendId) { GameObject fbtn = (GameObject)Instantiate(this.FriendListUiItemtoInstantiate); fbtn.gameObject.SetActive(true); FriendItem _friendItem = fbtn.GetComponent <FriendItem>(); _friendItem.FriendId = friendId; fbtn.transform.SetParent(this.FriendListUiItemtoInstantiate.transform.parent, false); this.friendListItemLUT[friendId] = _friendItem; }