private bool Remove(DecayingItem decayingItem)
        {
            bool result = this.internalList.Remove(decayingItem);

            this.version++;

            return(result);
        }
Esempio n. 2
0
        public override void OnItemDropped(GameObject worldGo)
        {
            DecayingItem component = worldGo.GetComponent <DecayingItem>();

            if (component)
            {
                DecayingInventoryItemView.LastUsed = this;
                component.DecayState = this.DecayProperties._state;
            }
        }
        public override void OnItemDropped(GameObject worldGo)
        {
            DecayingItem component = worldGo.GetComponent <DecayingItem>();

            if (component)
            {
                DecayingInventoryItemView.LastUsed = this;
                component._renderer.sharedMaterial = this._decayStatesMats[(int)this._state];
            }
        }
        private bool ResetLifetimeInternal(T item, TimeSpan lifeTime)
        {
            LinkedListNode <DecayingItem> currentNode = this.internalList.First;

            while (currentNode != null)
            {
                if (!currentNode.Value.IsDeath() && currentNode.Value.ItemValue.Equals(item))
                {
                    DecayingItem decayingItem = currentNode.Value;
                    decayingItem.SetLifeTime(lifeTime);
                    currentNode.Value = decayingItem;
                    return(true);
                }

                currentNode = currentNode.Next;
            }

            return(false);
        }
 public bool Equals(DecayingItem other)
 {
     return(this.ItemValue.Equals(other.ItemValue));
 }