Ejemplo n.º 1
0
        /// <summary>
        /// Update the observable collections
        /// </summary>
        public void UpdateInventoryCategories()
        {
            Treasures.Clear();
            Gems.Clear();
            ArmorSet.Clear();
            Buffs.Clear();

            foreach (var gameItemQuantity in _inventory)
            {
                if (gameItemQuantity.GameItem is Treasure)
                {
                    Treasures.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Gem)
                {
                    Gems.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is ArmorSet)
                {
                    ArmorSet.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Buff)
                {
                    Buffs.Add(gameItemQuantity);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Update the observable collections
        /// </summary>
        public void UpdateInventoryCategories()
        {
            Soldiers.Clear();
            SeigeWeapons.Clear();
            Treasures.Clear();
            Buffs.Clear();

            foreach (var gameItemQuantity in _inventory)
            {
                if (gameItemQuantity.GameItem is Soldier)
                {
                    Soldiers.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is SeigeWeapon)
                {
                    SeigeWeapons.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Treasure)
                {
                    Treasures.Add(gameItemQuantity);
                }
                if (gameItemQuantity.GameItem is Buff)
                {
                    Buffs.Add(gameItemQuantity);
                }
            }
        }
Ejemplo n.º 3
0
 public void UpdateInventoryCategories()
 {
     Potions.Clear();
     Treasures.Clear();
     Weapons.Clear();
     Allies.Clear();
     foreach (var GameItem in _inventory)
     {
         if (GameItem.GameItem is Potion)
         {
             Potions.Add(GameItem);
         }
         if (GameItem.GameItem is Treasure)
         {
             Treasures.Add(GameItem);
         }
         if (GameItem.GameItem is Weapon)
         {
             Weapons.Add(GameItem);
         }
         if (GameItem.GameItem is Allies)
         {
             Allies.Add(GameItem);
         }
     }
 }