Ejemplo n.º 1
0
    public void FillInventoryButton(ItemTypeSO itemType, bool isInteractable = true)
    {
        _buttonAction.interactable        = isInteractable;
        _buttonActionText.StringReference = itemType.ActionName;
        //bool isKeyboard = !(Input.GetJoystickNames() != null && Input.GetJoystickNames().Length > 0);

        bool isKeyboard = true;

        buttonPromptSetter.SetButtonPrompt(isKeyboard);
        if (isInteractable)
        {
            if (_inputReader != null)
            {
                hasEvent = true;
                _inputReader.inventoryActionButtonEvent += ClickActionButton;
            }
        }
        else
        {
            if (_inputReader != null)
            {
                if (hasEvent)
                {
                    _inputReader.inventoryActionButtonEvent -= ClickActionButton;
                }
            }
        }
    }
Ejemplo n.º 2
0
    public void FillInventoryButton(ItemTypeSO itemType, bool isInteractable = true)
    {
        _buttonAction.interactable        = isInteractable;
        _buttonActionText.StringReference = itemType.ActionName;

        bool isKeyboard = true;

        _buttonPromptSetter.SetButtonPrompt(isKeyboard);
        if (isInteractable)
        {
            if (_inputReader != null)
            {
                _hasEvent = true;
                _inputReader.InventoryActionButtonEvent += ClickActionButton;
            }
        }
        else
        {
            if (_inputReader != null)
            {
                if (_hasEvent)
                {
                    _inputReader.InventoryActionButtonEvent -= ClickActionButton;
                }
            }
        }
    }
Ejemplo n.º 3
0
    public void FillInteractionPanel(InteractionSO interactionItem)
    {
        _interactionName.StringReference = interactionItem.InteractionName;
        bool isKeyboard = true;

        //	bool isKeyboard = !(Input.GetJoystickNames() != null && Input.GetJoystickNames().Length > 0);
        buttonPromptSetter.SetButtonPrompt(isKeyboard);
    }