public void ProcessPlayerChoiceTest(string[] vocabArray, DialogueTestDataController testController) { currentDialogueTestData = testController; EnableSubmitBtn(); SetSubmitBtnText("Submit answer"); InsertVocabTestNode(currentDialogueTestData.GetPlayerVocab()); DisplayGrammar(); InsertPlayerInputField(); ScrollToDialogueElement(currentCharSpeaking); }
public void ProcessDialogueNodeTest(string[] vocabArray) { EnableSubmitBtn(); SetSubmitBtnText("Submit answer"); TestTrigger testTrigger = new TestTrigger("Translating to English", DialogueIcon, TestTrigger.TriggerType.DialogueNode); currentDialogueTestData = new DialogueTestDataController(testTrigger, vocabArray, DialogueTestDataController.TestType.read, GetSpeakersName(currentNodeID)); InsertVocabTestNode(currentDialogueTestData.GetPlayerVocab()); DisplayGrammar(); InsertPlayerInputField(); }
public void ProcessAbilityTest(CharAbility ability) { //queuedAbility = ability; EnableSubmitBtn(); SetSubmitBtnText("Submit answer"); SetObjectPortrait(playerCharacter.GetCombatController().GetCurrentEnemyTarget().CharacterPortrait); SetDialogueReasonSymbol(ability.myIcon); InsertSpacer(); TestTrigger testTrigger = new TestTrigger(ability.GetMyName(), ability.GetMyIcon(), TestTrigger.TriggerType.Ability); currentDialogueTestData = new DialogueTestDataController(testTrigger, playerCharacter.CharacterName); GameObject dialogueNode = BuildDialogueNode(currentDialogueTestData.GetVocabIntro()); //text instruction to player InsertDialogueNode(dialogueNode); InsertVocabTestNode(currentDialogueTestData.GetPlayerVocab()); DisplayGrammar(); InsertPlayerInputField(); SetInUse(); }
public void InitialiseMe(string id_, string text_, string nextNode_) { dialogueUI = FindObjectOfType <DialogueUI>(); playerCharacter = FindObjectOfType <PlayerCharacter>(); myID = id_; myText = text_; myNextNode = nextNode_; isVocabTest = (DbCommands.GetCountFromTable("PlayerChoicesVocabTests", "ChoiceIDs = " + myID) != 0); if (isVocabTest) { string[] playerChoiceTestArray = DbCommands.GetTupleFromTable("PlayerChoicesVocabTests", "ChoiceIDs = " + myID); vocabArray = new string[2]; vocabArray[0] = playerChoiceTestArray[1]; vocabArray[1] = playerChoiceTestArray[2]; print(vocabArray[0]); print(vocabArray[1]); TestTrigger testTrigger = new TestTrigger("Translating to Welsh", dialogueUI.DialogueIcon, TestTrigger.TriggerType.DialogueChoice); testData = new DialogueTestDataController(testTrigger, vocabArray, DialogueTestDataController.TestType.write, playerCharacter.CharacterName); } transform.GetComponentInChildren <Text>().text = (isVocabTest) ? "\t" + testData.GetPlayerVocab()[0] : "\t" + myText; }