Inventory.closeInventory C# (CSharp) Method

closeInventory() public method

public closeInventory ( ) : void
return void
    public void closeInventory()
    {
        this.gameObject.SetActive(false);
        checkIfAllInventoryClosed();
    }

Usage Example

コード例 #1
0
    void Update()
    {
        if (Input.GetKeyDown(inputManagerDatabase.CharacterSystemKeyCode))
        {
            if (!characterSystem.activeSelf)
            {
                characterSystemInventory.openInventory();
            }
            else
            {
                if (toolTip != null)
                {
                    toolTip.deactivateTooltip();
                }
                characterSystemInventory.closeInventory();
            }
        }

        if (Input.GetButtonDown("Inventory"))
        {
            if (!inventory.activeSelf)
            {
                mainInventory.openInventory();
            }
            else
            {
                if (toolTip != null)
                {
                    toolTip.deactivateTooltip();
                }
                mainInventory.closeInventory();
            }
        }

        if (Input.GetKeyDown(inputManagerDatabase.CraftSystemKeyCode))
        {
            if (!craftSystem.activeSelf)
            {
                craftSystemInventory.openInventory();
            }
            else
            {
                if (cS != null)
                {
                    cS.backToInventory();
                }
                if (toolTip != null)
                {
                    toolTip.deactivateTooltip();
                }
                craftSystemInventory.closeInventory();
            }
        }
    }
All Usage Examples Of Inventory::closeInventory