public void WarmUp(GameObject person) { star = person; _questionConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(0); _answerConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(0); _nameConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(0); string qText = _questionConfig.GetVal("questiontext"); string qName = _questionConfig.GetVal("qname"); string ftextInit = ""; Question1 = qText; ftextInit += qText; _questionConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(1); _answerConfigFormatter = new ConfigAnswerFormat(_answerConfig); PersonModel thestar = star.GetComponent<StagePerson>().GetPersonModel(); string answerToDisplay = _answerConfigFormatter.GetFormattedAnswer(thestar); string aName = _answerConfig.GetVal("aname"); ftextInit = ""; Answer1 = answerToDisplay; ftextInit += answerToDisplay; //yield return new WaitForSeconds(.1f); _answerConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(1); qText = _questionConfig.GetVal("questiontext"); qName = _questionConfig.GetVal("qname"); ftextInit = ""; Question2 = qText; ftextInit += qText; //Debug.Log(ftextInit); _questionConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(2); _answerConfigFormatter = new ConfigAnswerFormat(_answerConfig); answerToDisplay = _answerConfigFormatter.GetFormattedAnswer(thestar); aName = _answerConfig.GetVal("aname"); ftextInit = ""; Answer2 = answerToDisplay; ftextInit += answerToDisplay; _answerConfig = _weaveAppStarterGO.GetComponent<WeaveAppStarter>().GetWeaveConfigForQuestion(2); qText = _questionConfig.GetVal("questiontext"); qName = _questionConfig.GetVal("qname"); ftextInit = ""; Question3 = qText; ftextInit += qText; _answerConfigFormatter = new ConfigAnswerFormat(_answerConfig); answerToDisplay = _answerConfigFormatter.GetFormattedAnswer(thestar); aName = _answerConfig.GetVal("aname"); ftextInit = ""; Answer3 = answerToDisplay; isWarm = true; }
public WeaveConfigSet GetQuestionConfig(int qnumber) { WeaveConfigSet qconfig = null; XmlNode qconfignode; XmlNodeList questionNodes = _xmlConfig.GetElementsByTagName( "question" ); // returns all question tags no matter where they are in the hierarchy Debug.Log("XML Config >> questionNodes.Count = " + questionNodes.Count ); if ( qnumber < questionNodes.Count){ qconfignode = questionNodes[qnumber]; qconfig = new WeaveConfigSet(qconfignode); } else { Debug.Log("XML Config >> Not that many questions .... questionNodes.Count = " + questionNodes.Count ); } return qconfig; }
public ConfigAnswerFormat( WeaveConfigSet questionConfig ) { _questionConfig = questionConfig; }
public WeaveConfigSet GetQuestionConfig(int qnumber) { WeaveConfigSet qconfig = null; XmlNode qconfignode; XmlNodeList questionNodes = _config.GetElementsByTagName("question"); if(qnumber < questionNodes.Count) { qconfignode = questionNodes[qnumber]; qconfig = new WeaveConfigSet(qconfignode); } else { Debug.Log("XML Config >> Not that many questions .... questionNodes.Count = " + questionNodes.Count ); } return qconfig; }