コード例 #1
0
 public void ActivateNodeDetails()
 {
     GetPanel().SetActive(true);
     nodeTypeDropdown.value = 0;
     ToggleChoiceComponents();
     displayDialogueNodeDetailsBtn.GetComponent <Button>().interactable = false; //indicate to user that button no longer functions.
     if (editing)
     {
         print((dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode));
         string[] nodeDesc = DbCommands.GetTupleFromTable("DialogueNodes",
                                                          "NodeIDs = " + (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode).GetComponent <DialogueNode>().MyID);
         inputNodeText.text = nodeDesc[1];
         bool endDialogueOptionBool = false;
         if (nodeDesc[5] != "")
         {
             endDialogueOptionBool = (int.Parse(nodeDesc[5]) == 1) ? true : false;
         }
         endDialogueOptionToggle.isOn = endDialogueOptionBool;
         SetOverrideBtnTxt(nodeDesc[3], nodeDesc[4]);
     }
     else
     {
         ClearEditNodeDetails();
     }
 }
コード例 #2
0
        public void DisplayChoicesRelatedToNode()
        {
            GetPanel().SetActive(true);
            DialogueNode currentDialogueNode = (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode);

            FillDisplayFromDb(DbQueries.GetPlayerChoiceDisplayQry(currentDialogueNode.MyID), playerChoicesList.transform, BuildPlayerChoiceTextOnly);
            AppendDisplayFromDb(DbQueries.GetPlayerChoiceVocabDisplayQry(currentDialogueNode.MyID), playerChoicesList.transform, BuildPlayerChoiceVocab);
        }
コード例 #3
0
 public void InsertPlayerChoice(string choiceText, string choiceID)
 {
     DbCommands.InsertTupleToTable("PlayerChoices",
                                   choiceID,
                                   choiceText,
                                   (dialogueNodesListUI.GetSelectedItemFromGroup(dialogueNodesListUI.SelectedNode) as DialogueNode).MyID,
                                   null,
                                   "0");
 }