void changeState(StateName newState) { switch (currentState) { case StateName.Home: Broswer.SetActive(false); break; case StateName.Rumours: Story.SetActive(false); break; case StateName.Outcomes: Story.SetActive(false); break; } currentState = newState; switch (currentState) { case StateName.Home: Broswer.SetActive(true); break; case StateName.Rumours: Mill.Generate(); int iter = 0; while (!Mill.ready) { iter++; if (iter > 10000) { Debug.LogWarning("Crashed out of whilst waiting for rumour generation to complete"); } } Story.SetActive(true); panelInfoWaiting = true; break; case StateName.Outcomes: Story.SetActive(true); Cine.ShowOutcomes(); break; } }