void onLanguageSet() { currentLanguage = LanguageLocator.GetLanguage(); switch (TextType) { case TEXT_TYPE.ALERT: SetAlertText(); break; case TEXT_TYPE.BUTTON: SetButtonText(); break; case TEXT_TYPE.DIALOGUE: SetDialogueText(); break; case TEXT_TYPE.FEEDBACK: SetFeedbackText(); break; case TEXT_TYPE.LOADING: SetLoadingText(); break; case TEXT_TYPE.RESOLUTION: SetResolutionText(); break; } }
// Start is called before the first frame update void Start() { language = LanguageLocator.GetLanguage(); CollectablePickedupEvent.AddListener(onCollectablePickedup); string StartDialogue = language.GetDialogueText(DialogueText.DIALOGUE_TYPE.START); EventManager.Queue(new ShowDialogueEvent(StartDialogue)); }
void SetResolutionText(bool isCompleted) { LanguageObject language = LanguageLocator.GetLanguage(); Text resolutionText = GetComponentInChildren <Text>(); if (isCompleted) { resolutionText.text = language.GetResolutionText(ResolutionText.COMPLETION.SUCCESS); } else { resolutionText.text = language.GetResolutionText(ResolutionText.COMPLETION.FAILURE); } }
// Start is called before the first frame update void Start() { currentLanguage = LanguageLocator.GetLanguage(); AssignLanguage.OnLanguageSet += onLanguageSet; onLanguageSet(); }