Пример #1
0
 public static void RemoveEquipCollection(CharacterUI collection)
 {
     _equipToCollections.RemoveAll(o => o.collection == collection);
     //var found = equipToCollections.FirstOrDefault(o => o.collection == collection);
     //if (found != null)
     //equipToCollections.Remove(found);
 }
Пример #2
0
        protected virtual CharacterUI GetBestEquipToCollection()
        {
            CharacterUI last = null;

            foreach (var col in InventoryManager.GetEquipToCollections())
            {
                var best = GetBestEquipSlot(col);
                if (best != null && (best.slot.item == null || last == null))
                {
                    last = col;
                }
            }

            return(last);
        }
Пример #3
0
 /// <summary>
 /// Add a collection that functions as an Equippable collection. Items can be equipped to this collection.
 /// </summary>
 /// <param name="collection">The collection to add.</param>
 /// <param name="priority">
 /// How important is the collection, if you 2 collections can hold the item, which one should be chosen?
 /// Range of 0 to 100
 ///
 /// Note: This method is not used yet, it only registers the Equippable collection, that's it.
 /// </param>
 public static void AddEquipCollection(CharacterUI collection, int priority)
 {
     _equipToCollections.Add(new ItemCollectionPriority <CharacterUI>(collection, priority));
 }