Пример #1
0
        private RPGItems.Equipment InstantiateAndApplyEquipment(string equipmentName)
        {
            RPGItems.Equipment instance = null;
            if (!string.IsNullOrEmpty(equipmentName))
            {
                instance = (RPGItems.Equipment) Factory <Item> .CreateInstance(equipmentName);

                instance.ApplyEffect(this);
            }
            return(instance);
        }
Пример #2
0
        public void Load(string equipmentName)
        {
            RPGItems.Equipment instance = null;
            if (!string.IsNullOrEmpty(equipmentName))
            {
                instance = (RPGItems.Equipment) Factory <Item> .CreateInstance(equipmentName);

                Equip(instance);
            }
            else
            {
                equippedItem = null;
            }
        }