public void OnConfirmationButtonPressed() { Mediator.Instance.SoundManager.PlaySound(SoundType.Click); GameMode gameMode = FindObjectOfType <GameMode>(); if (!gameMode.TryStartGame(_currentRateValue)) { return; } AppMetricaManager.SendSetRate(_currentRateValue); GameplayManager.SettedRate = _currentRateValue; Close(); }
public void OnConfirmationButtonPressed() { Mediator.Instance.SoundManager.PlaySound(SoundType.Click); GameMode gameMode = FindObjectOfType <GameMode>(); if (Mediator.Instance.ResourcesStorage.Chips.Count < _currentRateValue) { _isSettedRateCallback?.Invoke(false); return; } AppMetricaManager.SendSetRate(_currentRateValue); GameplayManager.SettedRate = _currentRateValue; _isSettedRateCallback?.Invoke(true); Close(); }