private void CompleteQuest(QuestInfo questInfo) { if (questInfo.IsCompleted(_collectedCards) == false) { return; } foreach (var cardItem in _questItems) { if (cardItem.Quest == questInfo) { foreach (var requiredCard in questInfo.CardsRequired) { SpendCollectedCards(requiredCard.Key, requiredCard.Value); _collectedBonuses += requiredCard.Value; } Debug.Log("Bonuses collected: " + _collectedBonuses); cardItem.ResetItem(); break; } } _questsCompleted++; _activeQuestsAmount--; }