private void ResetUIObjects(UIGeneralStates actualState) { foreach (KeyValuePair <UIGeneralStates, GameObject> key in uiObjects) { if (key.Key != actualState) { key.Value.SetActive(false); } else { key.Value.SetActive(true); } } PauseGamePanelToggle(false); ClearShameConfirmPanelToggle(false); FinishGamePanelToggle(false); TakePicturePanelToggle(false); WallOfShamePanelToggle(false); }
public void SetState(UIGeneralStates _state) { actualState = _state; ResetUIObjects(_state); }