void OpenArea(VocabularyChapter newArea) { if (newArea != currentChapter) { currentChapter = newArea; activatePanel(currentChapter, true); ResetMenuButtons(); } }
void activatePanel(VocabularyChapter panel, bool status) { switch (panel) { case VocabularyChapter.Letters: AudioManager.I.PlayDialogue(LocalizationDataId.UI_Letters); LettersPage.SetActive(true); WordsPage.SetActive(false); break; case VocabularyChapter.Words: AudioManager.I.PlayDialogue(LocalizationDataId.UI_Words); LettersPage.SetActive(false); WordsPage.SetActive(true); break; case VocabularyChapter.Phrases: AudioManager.I.PlayDialogue(LocalizationDataId.UI_Phrases); PhrasesPage.SetActive(true); break; } }