public override void SetContent(int index, Dictionary <string, object> data) { m_poemData = (poemDataGenerate)data["poemData"]; if (LanguageManager.s_currentLanguage == SystemLanguage.ChineseTraditional) { SetText("Text_poemName", ZhConverter.Convert(m_poemData.m_poemName, ZhConverter.To.Traditional)); SetText("Text_author", ZhConverter.Convert(m_poemData.m_author, ZhConverter.To.Traditional)); } else { SetText("Text_poemName", m_poemData.m_poemName); SetText("Text_author", m_poemData.m_author); } }
public override void SetContent(int index, Dictionary <string, object> data) { string content = (string)data["content"]; if (content.Contains("space")) { SetText("Text", ""); } else { if (LanguageManager.s_currentLanguage == SystemLanguage.ChineseTraditional) { SetText("Text", ZhConverter.Convert(content, ZhConverter.To.Traditional)); } else { SetText("Text", content); } } }
static void CreateAnswer() { PuzzleService.Reset(); //去掉已出的所有句子 for (int i = 0; i <= s_currentLine; i++) { PuzzleService.RemoveSentence(currentPoemData.m_content[i]); } PuzzleService.RemoveSentence(GetCurrentContent()); s_correctIndex = GetRandomIndex(true); //正确答案 m_questions[s_correctIndex] = GetCurrentContent(); //错误答案 m_questions[GetRandomIndex(false)] = PuzzleService.GetErrorAnswer(GetCurrentContent()); m_questions[GetRandomIndex(false)] = PuzzleService.GetErrorAnswer(GetCurrentContent()); m_questions[GetRandomIndex(false)] = PuzzleService.GetErrorAnswer(GetCurrentContent()); if (LanguageManager.s_currentLanguage == SystemLanguage.ChineseTraditional) { m_questions[0] = ZhConverter.Convert(m_questions[0], ZhConverter.To.Traditional); m_questions[1] = ZhConverter.Convert(m_questions[1], ZhConverter.To.Traditional); m_questions[2] = ZhConverter.Convert(m_questions[2], ZhConverter.To.Traditional); m_questions[3] = ZhConverter.Convert(m_questions[3], ZhConverter.To.Traditional); } if (s_GameModel == GameModel.Arcade && HP == 0) { return; } GlobalEvent.DispatchEvent(GameEventEnum.QuestionChange); }