Example #1
0
        private void createFriendsDataModelService(CPDataEntityCollection dataEntityCollection, IFriendsService friendsService)
        {
            FriendsDataModelService friendsDataModelService = base.gameObject.AddComponent <FriendsDataModelService>();

            friendsDataModelService.enabled = false;
            friendsDataModelService.SetDataEntityCollection(dataEntityCollection);
            friendsService.AddMixFriendEventsListener(friendsDataModelService);
        }
Example #2
0
 private void updateFriendStatus()
 {
     if (findUserItem != null)
     {
         FriendStatus friendStatus = FriendsDataModelService.GetFriendStatus(handle);
         findUserItem.SetFriendStatus(friendStatus);
     }
 }
Example #3
0
 private FriendStatus updateFriendStatus()
 {
     FriendStatus = FriendsDataModelService.GetFriendStatus(Handle);
     if (DetailsController != null)
     {
         DetailsController.SetFriendStatus(FriendStatus);
     }
     if (ActionListController != null)
     {
         ActionListController.SetFriendStatus(FriendStatus);
     }
     return(FriendStatus);
 }
Example #4
0
 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");
 }
Example #5
0
    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);
    }
Example #6
0
    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);
    }