Esempio n. 1
0
    public void EnableCardInput(bool isEnabled)
    {
        foreach (Melee melee in _meleeActions)
        {
            if (IsMeleeDebuffed(melee, _debuff) || (_stamina <= 0.0f && melee.StaminaCost > 0.0f))
            {
                melee.SetRegisteringInput(false);
            }
            else
            {
                melee.SetRegisteringInput(isEnabled);
            }
        }

        _ItemsEnabled = isEnabled;
        foreach (Item item in _itemActions)
        {
            if (_debuff == Debuff.CANNOTUSEITEM)
            {
                item.SetRegisteringInput(false);
            }
            else if (item.ItemAmount <= 0)
            {
                item.SetRegisteringInput(false);
            }
            else
            {
                item.SetRegisteringInput(isEnabled);
            }
        }

        if (AI)
        {
            AI.SetAI(isEnabled);
        }
    }