public void PlaceBet() { wagerType = wagers.GetWagerType(); picks = rsd.GetSelectedRacers(); amountWagered = spinner.currentValue; raceManager.StartRace(); wagerPanel.SetActive(false); }
public void SetWagerInfoText(WagerType wagerType) { if (infoText == null) { infoText = GetComponent <TextMeshProUGUI>(); } switch (wagerType) { case WagerType.Win: infoText.text = "Pick 1st place winner"; break; case WagerType.Place: infoText.text = "Pick horse to place 1st or 2nd"; break; case WagerType.Show: infoText.text = "Pick horse to place 1st, 2nd or 3rd"; break; } }
public void WagerTypeSliderChanged() { winLabel.color = UnselectedColor; placeLabel.color = UnselectedColor; showLabel.color = UnselectedColor; switch (wagerTypeSlider.value) { case 0: // Pick winner winLabel.color = SelectedColor; break; case 1: // Pick horse to place 1st or 2nd placeLabel.color = SelectedColor; break; case 2: // pick horse to place 1st, 2nd or 3rd showLabel.color = SelectedColor; break; } type = (WagerType)wagerTypeSlider.value; wagerInfoPanel.SetWagerInfoText(type); }