|
@@ -38,6 +38,9 @@ public class FriendView : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
void EnterMyFriendBox() {
|
|
void EnterMyFriendBox() {
|
|
|
myFriendBox.SetActive(true);
|
|
myFriendBox.SetActive(true);
|
|
|
|
|
+ for (int i = 1; i < GetMyFriendItemParent().childCount; i++) {
|
|
|
|
|
+ Destroy(GetMyFriendItemParent().GetChild(i).gameObject);
|
|
|
|
|
+ }
|
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
|
if (list.Count > 0) {
|
|
if (list.Count > 0) {
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
@@ -45,9 +48,6 @@ public class FriendView : MonoBehaviour
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
- for (int i = 1; i < GetMyFriendItemParent().childCount; i++) {
|
|
|
|
|
- Destroy(GetMyFriendItemParent().GetChild(i).gameObject);
|
|
|
|
|
- }
|
|
|
|
|
GameObject o = GameObject.Instantiate(GetMyFriendItemPrefab(), GetMyFriendItemParent());
|
|
GameObject o = GameObject.Instantiate(GetMyFriendItemPrefab(), GetMyFriendItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = friendID.ToString();
|
|
o.name = friendID.ToString();
|
|
@@ -87,6 +87,9 @@ public class FriendView : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
void EnterFriendRequestBox() {
|
|
void EnterFriendRequestBox() {
|
|
|
friendRequestBox.SetActive(true);
|
|
friendRequestBox.SetActive(true);
|
|
|
|
|
+ for (int i = 1; i < GetFriendRequestItemParent().childCount; i++) {
|
|
|
|
|
+ Destroy(GetFriendRequestItemParent().GetChild(i).gameObject);
|
|
|
|
|
+ }
|
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
|
if (list.Count > 0) {
|
|
if (list.Count > 0) {
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
@@ -94,9 +97,6 @@ public class FriendView : MonoBehaviour
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
- for (int i = 1; i < GetFriendRequestItemParent().childCount; i++) {
|
|
|
|
|
- Destroy(GetFriendRequestItemParent().GetChild(i).gameObject);
|
|
|
|
|
- }
|
|
|
|
|
GameObject o = GameObject.Instantiate(GetFriendRequestItemPrefab(), GetFriendRequestItemParent());
|
|
GameObject o = GameObject.Instantiate(GetFriendRequestItemPrefab(), GetFriendRequestItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = otherID.ToString();
|
|
o.name = otherID.ToString();
|
|
@@ -154,15 +154,15 @@ public class FriendView : MonoBehaviour
|
|
|
}
|
|
}
|
|
|
string searchText = GetSearchInputField().text;
|
|
string searchText = GetSearchInputField().text;
|
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
Action<JArray> cb = delegate(JArray list) {
|
|
|
|
|
+ for (int i = 1; i < GetSearchPlayerItemParent().childCount; i++) {
|
|
|
|
|
+ Destroy(GetSearchPlayerItemParent().GetChild(i).gameObject);
|
|
|
|
|
+ }
|
|
|
if (list.Count > 0) {
|
|
if (list.Count > 0) {
|
|
|
foreach (var itemInfo in list) {
|
|
foreach (var itemInfo in list) {
|
|
|
int userID = itemInfo.Value<int>("id");
|
|
int userID = itemInfo.Value<int>("id");
|
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
int avatarID = itemInfo.Value<int>("avatarID");
|
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
string nickname = itemInfo.Value<string>("nickname");
|
|
|
bool online = itemInfo.Value<bool>("online");
|
|
bool online = itemInfo.Value<bool>("online");
|
|
|
- for (int i = 1; i < GetSearchPlayerItemParent().childCount; i++) {
|
|
|
|
|
- Destroy(GetSearchPlayerItemParent().GetChild(i).gameObject);
|
|
|
|
|
- }
|
|
|
|
|
GameObject o = GameObject.Instantiate(GetSearchPlayerItemPrefab(), GetSearchPlayerItemParent());
|
|
GameObject o = GameObject.Instantiate(GetSearchPlayerItemPrefab(), GetSearchPlayerItemParent());
|
|
|
o.SetActive(true);
|
|
o.SetActive(true);
|
|
|
o.name = userID.ToString();
|
|
o.name = userID.ToString();
|