void VerifyDialogueData() { VerifySlideLengths(); VerifyValidOptions(conversation.slides, fromLanguage.ToString()); VerifyValidOptions(conversationToTranslate.slides, fromLanguage.ToString()); }
void Start() { fromLanguage = DialogueManager.dialogueManager.fromLanguage; toLanguage = DialogueManager.dialogueManager.toLanguage; dialogueFileFrom = new DialogueFile(name, fromLanguage.ToString()); dialogueFileTo = new DialogueFile(name, toLanguage.ToString()); conversation = dialogueFileFrom.LoadConversation(); conversationToTranslate = dialogueFileTo.LoadConversation(); VerifyDialogueData(); }
void VerifySlideLengths() { if (conversation.slides.Length != conversationToTranslate.slides.Length) { string message = string.Format( "Conversations of unequal length between {0} and {1}!", fromLanguage.ToString(), toLanguage.ToString()); throw new Exception(message); } }