public IEnumerator SetFriends(string userID, LobbyUserGroupInfo friends, Result <bool> result) { this.friends[userID] = friends; SaveJSONFile("friends-" + userID + ".json", JsonUtility.ToJson(friends, true)); result.SetValue(true); yield break; }
public IEnumerator GetFriends(string userID, Result <LobbyUserGroupInfo> result) { if (!friends.ContainsKey(userID)) { var info = new LobbyUserGroupInfo(); info.isInvitationRequired = true; info.members = new List <string>(); friends[userID] = info; } result.SetValue(friends[userID]); yield break; }