Ejemplo n.º 1
0
        /// <summary>
        /// Transfers a single item from another collection to this collection.
        /// Item will be removed from source collection and placed in this collection.
        /// UID will be retained.
        /// </summary>
        /// <param name="item">Item to transfer.</param>
        /// <param name="source">Source collection to transfer from.</param>
        public void Transfer(DaggerfallUnityItem item, EntityItems source)
        {
            if (item == null || source == null)
            {
                return;
            }

            source.RemoveItem(item);
            AddItem(item);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Replaces all items in this collection with clones of items from source collection.
        /// Items in this collection will be destroyed. Source items will not be changed.
        /// New UIDs will be allocated to cloned items.
        /// </summary>
        /// <param name="source">Source collection to copy from.</param>
        public void ReplaceAll(EntityItems source)
        {
            if (source == null)
            {
                return;
            }

            Clear();
            CopyAll(source);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Clones all items from source collection into this collection.
        /// Source items will not be changed.
        /// New UIDs will be allocated to cloned items.
        /// </summary>
        /// <param name="source">Source collection to copy from.</param>
        public void CopyAll(EntityItems source)
        {
            if (source == null)
            {
                return;
            }

            foreach (DaggerfallUnityItem item in source.items.Values)
            {
                AddItem(item.Clone());
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Transfers all items from another collection.
        /// Items will be removed from source collection and placed in this collection.
        /// UIDs will be retained.
        /// </summary>
        /// <param name="source">Source collection to transfer from.</param>
        public void TransferAll(EntityItems source)
        {
            if (source == null)
            {
                return;
            }

            foreach (DaggerfallUnityItem item in source.items.Values)
            {
                AddItem(item);
            }

            source.Clear();
        }
 /// <summary>
 /// Transfers items from another collection.
 /// Items will be removed from other collection and placed in this one.
 /// </summary>
 /// <param name="other">Source of items to transfer from.</param>
 public void Transfer(EntityItems other)
 {
 }
 /// <summary>
 /// Copies items from another collection.
 /// </summary>
 /// <param name="other">Source of items to copy from.</param>
 public void Copy(EntityItems other)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Transfers items from another collection.
 /// Items will be removed from other collection and placed in this one.
 /// </summary>
 /// <param name="other">Source of items to transfer from.</param>
 public void Transfer(EntityItems other)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Copies items from another collection.
 /// </summary>
 /// <param name="other">Source of items to copy from.</param>
 public void Copy(EntityItems other)
 {
 }