Beispiel #1
0
        /// <summary>
        /// Add an item to the given equip location. Do not attempt to equip to
        /// an incompatible slot.
        /// </summary>
        public void AddItem(EquipLocation slot, EquipableItem item)
        {
            Debug.Assert(item.CanEquip(slot, this));

            equippedItems[slot] = item;

            if (equipmentUpdated != null)
            {
                equipmentUpdated();
            }
        }
        /// <summary>
        /// Add an item to the given equip location. Do not attempt to equip to
        /// an incompatible slot.
        /// </summary>
        public void AddItem(EquipLocation slot, EquipableItem item)
        {
            Debug.Assert(item.GetAllowedEquipLocation() == slot);

            equippedItems[slot] = item;

            if (equipmentUpdated != null)
            {
                equipmentUpdated();
            }
        }
Beispiel #3
0
        /// <summary>
        /// Attempts to add item to the request equipment slot
        /// </summary>
        /// <param name="item"></param>
        /// <param name="location"></param>
        public void AddItem(EquipableItem item, EquipLocation location)
        {
            //Check if the item can go into the requested slot
            Debug.Assert(item.GetAllowedEquipLocation() == location);

            //Equip the item
            m_EquippedItems[location] = item;

            if (equipmentUpdated != null)
            {
                equipmentUpdated();
            }
        }