예제 #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;
 }
		private void onMembershipData(MembershipData membershipData)
		{
			this.membershipData = membershipData;
			checkForData();
		}
 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;
     }
 }