Пример #1
0
    private void OnSelection(InputAction.CallbackContext obj)
    {
        if (!GameManager.Instance.choosingPhase.activeSelf ||
            cooldownPick > Time.time)
        {
            return;
        }

        if (itemInHand != null && itemInHand.item != null && itemInHand.item.gameObject.activeSelf &&
            !(selectedX == 0 && selectedY == 0))
        {
            cooldownPick = itemInHand.item.secondsToPull + Time.time;
            wallet.AddToWallet(itemInHand.item);

            selectedX = 0;
            selectedY = 0;

            SearchSelectedItem();
        }
    }