Example #1
0
    private void CanEat()
    {
        canEat = true;

        if (playerEquipment.GetIngredientsIds().Count < requirements.GetIngredientsIds().Count)
        {
            canEat = false;
            return;
        }

        for (int i = 0; i < requirements.GetIngredientsIds().Count; i++)
        {
            if (!playerEquipment.GetIngredientsIds().Contains(requirements.GetIngredientsIds()[i]))
            {
                canEat = false;
                break;
            }
        }
    }