public void backToMenu() { movement = FindObjectOfType<Movement>().GetComponent<Movement>(); movement.onMenuStart(); esctomenupanel.SetActive(true); esctomenu = true; changeState(1, true); }
// Update is called once per frame void Update() { if (donewithintro) { pct1 = PilloController.GetSensor(Pillo.PilloID.Pillo1); pct2 = PilloController.GetSensor(Pillo.PilloID.Pillo2); checkForControlSwitch(); if (pickupspawning.checkForDone()) { if (mode == 1) { enableVictoryScreen(); } if (mode == 2) { if (nhs.finished == true) { enableVictoryScreen(); } movement = FindObjectOfType<Movement>().GetComponent<Movement>(); movement.onMenuStart(); tt.stopCounting(); highscorepanel.SetActive(true); highscorepanel.GetComponentInChildren<Text>().text = tt.returnTimeInString(); nhs.ended = true; ca.goalsAvailable = false; compassBg.SetActive(false); } //enableVictoryScreen(); //firstmenupress = true; } if (mode == 2 && !inmenu) { timetext.GetComponent<Text>().text = "Time: " + tt.returnTimeInString(); } if (inmenu || intutorial || inoptions || inquit || esctomenu || invictory) { checkForPresses(); } if (!inmenu && pillocontrol && !intutorial && !inoptions) { updateSliderValues(); rotateSliderHandles(); } if (!inmenu) { if (!esctomenu) { checkForQuit(); } if (!inquit) { checkForMenu(); } } } }
public void quitGame() { movement = FindObjectOfType<Movement>().GetComponent<Movement>(); movement.onMenuStart(); inquit = true; //inmenu = false; quitpanel.SetActive(true); //currentselectedbutton = null; changeState(1, true); }
public void enableVictoryScreen() { ca.goalsAvailable = false; movement = FindObjectOfType<Movement>().GetComponent<Movement>(); movement.onMenuStart(); invictory = true; victorypanel.SetActive(true); }