public static MenuOptions GetInstance() { if (_instance == null) { _instance = FindObjectOfType <MenuOptions>(); ItemsTags.Init(); } return(_instance); }
public IQueryable GetItemsByTagId(int tag_id) { var items = Items.Where(i => (ItemsTags.Where( it => it.tag_id == tag_id) .Select(it => it.item_id) .Distinct() ) .Contains(i.id)); return(items); }