示例#1
0
    public void Hide()
    {
        List <Item> items = GetItemsInSlots();

        for (int i = 0; i < items.Count; i++)
        {
            Inventory.AddItem(items[i].Id);
        }

        if (currentSelectedSlot != null)
        {
            currentSelectedSlot.RestoreDefaultSprite();
        }

        currentSelectedSlot = null;

        slot0.SelectItem(null);
        slot1.SelectItem(null);
        slot2.SelectItem(null);
        ClearResultSlot();

        inventoryPanel.Hide();
        gameObject.SetActive(false);

        if (!GameTimer.timeReached)
        {
            CharacterController2D.EnableMovement();
            interactionController.EnableInteracting();
        }
    }
示例#2
0
    public void EnableInputs()
    {
        CharacterController2D.EnableMovement();
        InventoryManager.EnableInventory();
        interactionController.EnableInteracting();

#if UNITY_ANDROID
        inventoryButton.SetActive(true);
#endif
    }
示例#3
0
    public void HideAndRestoreMovement()
    {
        Hide();

        if (!GameTimer.timeReached)
        {
            CharacterController2D.EnableMovement();
            interactionController.EnableInteracting();
        }
    }