public void ResetToMenu() { ResetTimer(); menuObj.SetActive(true); startBtns.SetActive(true); MuseumObj.SetActive(false); }
void Update() { totalTimerF += Time.deltaTime; totalTimerTxt.text = "Total: " + Mathf.RoundToInt(totalTimerF).ToString(); if (timerActivated && (SceneManage.loadTestScene == 1 || SceneManage.loadTestScene == 2)) { sceneTimerF += Time.deltaTime; sceneTimer = Mathf.RoundToInt(sceneTimerF); } if (SceneManage.loadTestScene == 1) { sceneTimerTxt.text = "Scene: " + Mathf.RoundToInt(sceneTimerF).ToString() + " / 120"; if (sceneTimer >= 10) //120 { kitchenObjs.SetActive(false); ResetTimer(); } } else if (SceneManage.loadTestScene == 2) { sceneTimerTxt.text = "Scene: " + Mathf.RoundToInt(sceneTimerF).ToString() + " / 300"; if (sceneTimer >= 300) { bakingObjs.SetActive(false); ResetTimer(); } } else if (SceneManage.loadTestScene == 3) { sceneTimerF = PaintingsSets.prevDelta; sceneTimerTxt.text = "Scene: " + Mathf.RoundToInt(sceneTimerF).ToString() + " / 60 per sæt"; sceneTimer = Mathf.RoundToInt(sceneTimerF); } if (PaintingsSets.paintingsSeen) { //ResetToMenu(); MuseumObj.SetActive(false); ResetTimer(); PaintingsSets.paintingsSeen = false; } }