void CheckResult() { if (buttonValue == result) { initialSquare.transform.GetChild(1).GetComponent <Image>().enabled = true; initialSquare.transform.GetChild(0).GetComponent <Text>().enabled = false; initialSquare.transform.GetComponent <Button>().interactable = false; pointManager.IncreasePoint(difficultyLevel); division.RemoveAt(questionNumber); if (division.Count > 0) { Question(); } else { GameOver(); } } else { right--; rightManager.CheckRights(right); } if (right <= 0) { GameOver(); } }
private void Awake() { right = 3; resultPanel.GetComponent <RectTransform>().localScale = Vector3.zero; rightManager = Object.FindObjectOfType <RightManager>(); pointManager = Object.FindObjectOfType <PointManager>(); rightManager.CheckRights(right); }