private void createFriendsDataModelService(CPDataEntityCollection dataEntityCollection, IFriendsService friendsService) { FriendsDataModelService friendsDataModelService = base.gameObject.AddComponent <FriendsDataModelService>(); friendsDataModelService.enabled = false; friendsDataModelService.SetDataEntityCollection(dataEntityCollection); friendsService.AddMixFriendEventsListener(friendsDataModelService); }
private void updateFriendStatus() { if (findUserItem != null) { FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(handle); findUserItem.SetFriendStatus(friendStatus); } }
private FriendStatus updateFriendStatus() { FriendStatus = FriendsDataModelService.GetFriendStatus(Handle); if (DetailsController != null) { DetailsController.SetFriendStatus(FriendStatus); } if (ActionListController != null) { ActionListController.SetFriendStatus(FriendStatus); } return(FriendStatus); }
private void setUpFindUserItem() { if (findUserItem != null) { FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(handle); findUserItem.SetPlayer(handle); findUserItem.SetFriendStatus(friendStatus); findUserItem.SetName(dataEntityCollection.GetComponent <DisplayNameData>(handle).DisplayName); findUserItem.SetPreloaderActive(isActive: true); findUserItem.SetAvatarIconActive(isActive: false); return; } throw new MissingReferenceException("Find user result prefab not found"); }
protected override float UpdateWeighting() { float result = 0f; FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(request.Data.PenguinHandle); if (friendStatus == FriendStatus.Friend) { result = Data.FriendWeighting; } else if (friendStatus == FriendStatus.IncomingInvite || friendStatus == FriendStatus.OutgoingInvite) { result = Data.PendingFriendWeighting; } return(result); }
private bool onFindUserResponse(FriendsServiceEvents.FindUserSent evt) { Service.Get <EventDispatcher>().RemoveListener <FriendsServiceEvents.FindUserSent>(onFindUserResponse); string message = "other"; if (evt.Success) { DataEntityHandle entityByType = Service.Get <CPDataEntityCollection>().GetEntityByType <SearchedUserData>(); FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(entityByType); if (friendStatus == FriendStatus.Friend) { message = "friend"; } } Service.Get <ICPSwrveService>().StartTimer("igloo", "visit", message); return(false); }