public void Collect(int hours) { if (IsBonusReady) { IsBonusReady = false; var config = _bonusesConfig.GetBonuses.First(b => b.Hours == hours); _progressController.AddCrystals(config.Reward); OnRewardCollected?.Invoke(); } }
public void CollectReward() { if (IsCurrentQuestsCompleted) { _progressController.AddCrystals(GetCurrentQuests.Reward); ++_currentQuestIndex; var count = _questsConfig.GetQuests.Count(); if (_currentQuestIndex >= count) { _currentQuestIndex = count - 1; } OnRewardCollected?.Invoke(); } }