示例#1
0
 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;
 }
示例#2
0
 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;
 }