private void Update() { if (state == uiState.PLAYING) { UpdateUI(); UpdateParticleSystems(); } else if (state == uiState.FEEDBACK && !isUpdatingFeedbackScreen) { isUpdatingFeedbackScreen = true; foreach (GameObject uiElement in playingUIElements) { uiElement.SetActive(false); } feedbackUIElements.SetActive(true); levelStatsData.UpdateScore(currentScore); levelStatsData.UpdateMaxChain(maxChainCounter); feedbackWindowMusicName.text = musicDataText[0].text; feedbackWindowPlayerName.text = levelStatsData.levelData.name + " : " + System.DateTime.Now.Date.ToString(); StartCoroutine("ShowFeedbackCoroutine"); } else if (state == uiState.FEEDBACK) { /* TODO*/ } else { Debug.LogWarning("UI in a state not defined"); } }