private void InitializeWeapons() { IEnumerable <Weapon> weapons = WeaponManager.Instance.Weapons; MondstadtWeapons = weapons .Where(item => WeaponHelper.IsTodaysMondstadtWeapon(item.Material)) .Where(item => WeaponManager.UnreleasedPolicyFilter(item)) .OrderByDescending(item => item.Star) .Select(item => { var w = new WeaponIcon() { Weapon = item }; w.IconClicked += OnWeaponClicked; return(w); }); LiyueWeapons = weapons .Where(item => WeaponHelper.IsTodaysLiyueWeapon(item.Material)) .Where(item => WeaponManager.UnreleasedPolicyFilter(item)) .OrderByDescending(item => item.Star) .Select(item => { var w = new WeaponIcon() { Weapon = item }; w.IconClicked += OnWeaponClicked; return(w); }); }
private void InitializeWeapons() { IEnumerable <Weapon> weapons = WeaponManager.Instance.Weapons; this.MondstadtWeapons = weapons .Where(item => WeaponHelper.IsTodaysMondstadtWeapon(item.Material)) .Where(item => WeaponManager.UnreleasedPolicyFilter(item)) .OrderByDescending(item => item.Star) .Select(item => new WeaponIcon() { Weapon = item }); this.LiyueWeapons = weapons .Where(item => WeaponHelper.IsTodaysLiyueWeapon(item.Material)) .Where(item => WeaponManager.UnreleasedPolicyFilter(item)) .OrderByDescending(item => item.Star) .Select(item => new WeaponIcon() { Weapon = item }); }