Beispiel #1
0
    public void SetState(IglooPropertiesCard.IglooCardState state)
    {
        switch (state)
        {
        case IglooPropertiesCard.IglooCardState.MemberLocked:
            LockedOverlay.SetActive(value: true);
            MemberLockedOverlay.SetActive(value: true);
            break;

        case IglooPropertiesCard.IglooCardState.ProgressionLocked:
            LockedOverlay.SetActive(value: true);
            ProgressionLockedOverlay.SetActive(value: true);
            break;

        default:
            LockedOverlay.SetActive(value: false);
            MemberLockedOverlay.SetActive(value: false);
            ProgressionLockedOverlay.SetActive(value: false);
            break;
        }
    }
Beispiel #2
0
 private void setIglooPropertiesCard(LotDefinition lotDefinition, SavedIglooMetaData iglooMetaData)
 {
     if (membershipData.IsMember && !iglooMetaData.MemberOnly)
     {
         return;
     }
     if (!iglooPropertiesCards.ContainsKey(iglooMetaData.LayoutId))
     {
         Log.LogErrorFormatted(this, "Unable to find igloo layout card with layout id of {0}.", iglooMetaData.LayoutId);
         return;
     }
     IglooPropertiesCard.IglooCardState state = IglooPropertiesCard.IglooCardState.InActive;
     if (iglooMetaData.MemberOnly && !membershipData.IsMember)
     {
         state = IglooPropertiesCard.IglooCardState.MemberLocked;
     }
     else if (savedIgloosMetaData.ActiveIglooId.HasValue && iglooMetaData.LayoutId == savedIgloosMetaData.ActiveIglooId.Value)
     {
         state = IglooPropertiesCard.IglooCardState.Active;
     }
     iglooPropertiesCards[iglooMetaData.LayoutId].Init(this, lotDefinition, iglooMetaData, state);
 }