public List <TcgCard> FilteredCards() { List <TcgCard> filteredCards = CardsAll; currentFormatFilter = FormatFilterMap[PlayerPrefs.GetInt("FormatFilter", 0)]; currentMoneyFilter = PlayerPrefs.GetInt("MoneyFilter", 0); //CultureInfo englishLang = CultureInfo.InvariantCulture; filteredCards = filteredCards.Where(card => (card.LowPrice <= currentMoneyFilter || currentMoneyFilter == 0) && (currentFormatFilter == FormatFilters.None || card.Formats.Any (format => format.IndexOf(currentFormatFilter.ToString(), StringComparison.OrdinalIgnoreCase) >= 0)) ).ToList(); return(filteredCards); }
public void ChangeFormatFilter(FormatFilters target) { currentFormatFilter = target; PlayerPrefs.SetInt("FormatFilter", (int)target); }