public void ChangeSize(int change) { if (sizeButtonPos && sizeButtonNeg) { List <TargetSize> sizeList; sizeList = Enum.GetValues(typeof(TargetSize)).Cast <TargetSize>().ToList(); targetSize = sizeList[(int)Mathf.Repeat(sizeList.IndexOf(targetSize) + change, sizeList.Count)]; sizeText.GetComponent <TextMeshProUGUI>().text = targetSize.ToString(); } }
private void ButtonSetup() { difficulty = Difficulty.Medium; difficultyText.GetComponent <TextMeshProUGUI>().text = difficulty.ToString(); targetSize = TargetSize.Medium; sizeText.GetComponent <TextMeshProUGUI>().text = targetSize.ToString(); duration = Duration.Normal; durationText.GetComponent <TextMeshProUGUI>().text = duration.ToString(); }