コード例 #1
0
 private void onMembershipChanged(MembershipData membershipData)
 {
     if (dataEntityCollection.TryGetComponent <RememberMeData>(dataEntityCollection.LocalPlayerHandle, out var component))
     {
         component.MembershipChanged(membershipData.IsMember, membershipData.MembershipType);
     }
 }
コード例 #2
0
 private void onMembershipDataChanged(MembershipData obj)
 {
     if (isMember != obj.IsMember)
     {
         isMember = obj.IsMember;
         membershipSet(isMember);
     }
 }
コード例 #3
0
 private void onMembershipDataUpdated(MembershipData updatedMembershipData)
 {
     if (updatedMembershipData.IsMember)
     {
         if (gameStateController.IsAccountSystenActive)
         {
             gameStateController.OnAccountAccountSystemDeacitvated += onAccountAccountSystemDeacitvated;
         }
         else
         {
             showAllAccessCelebration();
         }
     }
 }
コード例 #4
0
        private static void updateMembershipDataValues(bool isAllAccessActive)
        {
            CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

            DataEntityHandle[] entitiesByType = cPDataEntityCollection.GetEntitiesByType <MembershipData>();
            for (int i = 0; i < entitiesByType.Length; i++)
            {
                MembershipData component = cPDataEntityCollection.GetComponent <MembershipData>(entitiesByType[i]);
                if (component.MembershipType != MembershipType.Member)
                {
                    component.IsMember       = isAllAccessActive;
                    component.MembershipType = (isAllAccessActive ? MembershipType.AllAccessEventMember : MembershipType.None);
                }
            }
        }
コード例 #5
0
 private void onMembershipDataAdded(MembershipData membershipData)
 {
     onMembershipChanged(membershipData);
     membershipData.MembershipDataUpdated += onMembershipChanged;
 }
コード例 #6
0
 public void showMembershipKey(MembershipData membershipData)
 {
     MembershipSprite.gameObject.SetActive(membershipData.IsMember ? true : false);
 }
コード例 #7
0
 private void onMembershipDataAdded(MembershipData membershipData)
 {
     this.membershipData = membershipData;
     onMembershipDataChanged(membershipData);
     membershipData.MembershipDataUpdated += onMembershipDataChanged;
 }
コード例 #8
0
		private void onMembershipData(MembershipData membershipData)
		{
			this.membershipData = membershipData;
			checkForData();
		}
コード例 #9
0
 private void setUpProfile(ProfileData profileData, PresenceData presenceData, MembershipData membershipData, OtherPlayerData data)
 {
     profileData.PenguinAgeInDays  = ((data.profile != null) ? data.profile.daysOld : 0);
     profileData.MascotXP          = data.mascotXP;
     membershipData.IsMember       = data.member;
     profileData.ZoneId            = data.zoneId;
     membershipData.MembershipType = (data.member ? MembershipType.Member : MembershipType.None);
     if (!membershipData.IsMember && Service.Get <AllAccessService>().IsAllAccessActive())
     {
         membershipData.IsMember       = true;
         membershipData.MembershipType = MembershipType.AllAccessEventMember;
     }
     if (data.onlineLocation != null)
     {
         profileData.IsOnline           = true;
         presenceData.World             = data.onlineLocation.world;
         presenceData.Room              = data.onlineLocation.zoneId.name;
         presenceData.ContentIdentifier = data.onlineLocation.contentIdentifier;
         if (string.IsNullOrEmpty(data.onlineLocation.zoneId.instanceId))
         {
             presenceData.InstanceRoom = null;
         }
         else
         {
             presenceData.InstanceRoom = data.onlineLocation.zoneId;
         }
     }
     else
     {
         profileData.IsOnline           = false;
         presenceData.World             = null;
         presenceData.Room              = null;
         presenceData.ContentIdentifier = null;
         presenceData.InstanceRoom      = null;
     }
 }