Ejemplo n.º 1
0
        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);
            });
        }
Ejemplo n.º 2
0
        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
            });
        }