コード例 #1
0
    private void Update()
    {
        IInventoryItem inventoryItem;

        if (this._displayInventory)
        {
            if (!RPOS.Item_IsClickedCell(this))
            {
                this._displayInventory.GetItem((int)this._mySlot, out inventoryItem);
                if (this._displayInventory.MarkSlotClean((int)this._mySlot) || !object.ReferenceEquals(this._myDisplayItem, inventoryItem))
                {
                    this.SetItem(inventoryItem);
                }
            }
            else
            {
                this.MakeEmpty();
            }
            if (!RPOS.IsOpen && this._darkener)
            {
                if (this.backupColor == Color.cyan)
                {
                    this.backupColor = this._darkener.color;
                }
                if (this._myDisplayItem == null || this._displayInventory._activeItem != this._myDisplayItem)
                {
                    this._darkener.color = this.backupColor;
                }
                else
                {
                    this._darkener.color = Color.grey;
                }
            }
        }
    }