public void TurnWheel() { try { _buy.BuySomething(); if (CurrentCoinsAmount >= TurnCost) { _events.Interactable(false); _currentLerpRotationTime = 0f; for (int i = 0; i <= 19; i++) { _sectorsAngles[i] = 18 * i; } int fullCircles = 12; float randomFinalAngle = _sectorsAngles[Random.Range(0, _sectorsAngles.Length)]; _finalAngle = -(fullCircles * 360 + randomFinalAngle); _isStarted = true; PreviousCoinsAmount = CurrentCoinsAmount; CurrentCoinsAmount -= TurnCost; } } catch { Debug.Log("предложение показа рекламы"); return; } }
public void BuyButton() { try { _buy = new Buy(new RafflePrice(_totalCount.CountBuy * _config.Price().GetPrice())); _buy.BuySomething(); _config.UpCountTicket(_totalCount.CountBuy); gameObject.SetActive(false); _buyPanelView.RafflePanel.SetActive(true); } catch { gameObject.SetActive(false); return; } }