OpFindFriends
How do I use Op Find Friends
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: LoadbalancingPeer.cs
Copy
267 /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
271 public virtual bool OpFindFriends(string[] friendsToFind)
272 {
273 Dictionary
274 if (friendsToFind != null && friendsToFind.Length > 0)
275 {
276 opParameters[ParameterCode.FindFriendsRequestList] = friendsToFind;
277 }
278
279 return this.OpCustom(OperationCode.FindFriends, opParameters, true);
280 }
File name: NetworkingPeer.cs
Copy
1394 /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
1398 public override bool OpFindFriends(string[] friendsToFind)
1399 {
1400 if (this.isFetchingFriends)
1401 {
1402 return false; // fetching friends currently, so don't do it again (avoid changing the list while fetching friends)
1403 }
1404
1405 this.friendListRequested = friendsToFind;
1406 this.isFetchingFriends = true;
1407
1408 return base.OpFindFriends(friendsToFind);
1409 }
File name: PhotonNetwork.cs
Copy
1337 /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
1341 public static bool FindFriends(string[] friendsToFind)
1342 {
1343 if (networkingPeer == null || isOfflineMode)
1344 {
1345 return false;
1346 }
1347
1348 return networkingPeer.OpFindFriends(friendsToFind);
1349 }
OpFindFriends 115 lượt xem
Gõ tìm kiếm nhanh...