void OpenProgressReport() { floatToInt = Mathf.RoundToInt(progress.fillAmount * 100); if (floatToInt == 50 && !midterm) { midterm = true; displayCard = true; isCardOff = true; } if (floatToInt == 100 && !endterm) { endterm = true; displayCard = true; isCardOff = true; } if (displayCard) { progressReport.gameObject.SetActive(true); if (isCardOff) { progressReport.GetComponent <ProgressReport>().ReportCardGeneration(); isCardOff = false; } progressReport.classRoom.SetActive(false); planSelected = false; termManager.lessonPlanButton.SetActive(false); //displayCard = false; } else { progressReport.gameObject.SetActive(false); progressReport.classRoom.SetActive(true); } }