public void CorrectAnswer() //Regenerates an equation { EG.CallGrade(); tape = FindObjectOfType <Tape>().GetComponent <Tape>(); tape.startfunciton = true; BC = FindObjectOfType <Boxcount>().GetComponent <Boxcount>(); BC.DeletAll(); }
public void MainMenuActive() { Credit.SetActive(false); goback = true; equationgen = true; stopTime.TheWorld = true;// in timer stopTime.timeStop = false; BC = FindObjectOfType <Boxcount>().GetComponent <Boxcount>(); BC.DeletAll(); if (MainMenu.activeSelf == false) { /*GameObject exhaustP = GameObject.Find("Exhaust"); * GameObject exhaustC = exhaustP.transform.Find("ExhaustPrewarm").gameObject; * exhaustC.SetActive(true); * //exhaust.SetActive(true); */ GameObject[] temp = SceneManager.GetSceneByName("Main Menu").GetRootGameObjects(); for (int i = 0; i < temp.Length; i++) { if (temp[i].name == "Exhaust") { Exh = temp[i].GetComponent <Exhaust>(); Exh.PlayExhoust(); } } Debug.Log("testing!!!"); if (musicTriger) { mainMu.Play(); gameAb.Stop(); gameMu.Stop(); musicTriger = false; Debug.Log("Play main menu music"); }//if (CameraTransitions.GetBool("MenuTOGrade") == true) //{ // CameraTransitions.SetBool("MenuTOGrade", false); // CameraTransitions.SetBool("GradeTOMenu", true); //} if (mainMenu == "Main Menu") { if (Staging.activeSelf == false) { OptionsDash.SetActive(false); Staging.SetActive(true); MainMenu.SetActive(true); HighScore.SetActive(false); } else { MainMenu.SetActive(true); GradeSelect.SetActive(false); Options.SetActive(false); PauseScreen.SetActive(false); InGameOverlay.SetActive(false); Labels.SetActive(false); HighScore.SetActive(false); } } else { MainMenu.SetActive(true); GradeSelect.SetActive(false); Options.SetActive(false); PauseScreen.SetActive(false); InGameOverlay.SetActive(false); Labels.SetActive(false); OptionsDash.SetActive(false); Staging.SetActive(true); HighScore.SetActive(false); } //CameraTransitions = FindObjectOfType<Animator>().GetComponent<Animator>(); //if (CameraTransitions.GetBool("MenuTOGrade") == true) //{ // CameraTransitions.SetBool("MenuTOGrade", false); // CameraTransitions.SetBool("GradeTOMenu", true); //} } }