public override void DeleteSelf()
 {
     print(myChoiceID);
     Debugging.PrintDbTable("PlayerChoices");
     dialogueUI.DeleteCompleteDialogueResult(MyChoiceID);
     Destroy(gameObject);
     Destroy(this);
 }
예제 #2
0
        public void DisplayNodesRelatedToDialogue()
        {
            DisplayComponents();
            Dialogue currentDialogue = (dialogueUI.GetSelectedItemFromGroup(dialogueUI.selectedDialogue) as Dialogue);

            FillDisplayFromDb(DbQueries.GetDialogueNodeDisplayQry(currentDialogue.MyID), dialogueNodesList, BuildDialogueNodeTextOnly);
            AppendDisplayFromDb(DbQueries.GetDialogueNodeVocabDisplayQry(currentDialogue.MyID), dialogueNodesList, BuildDialogueNodeVocabTest);
            Debugging.PrintDbQryResults(DbQueries.GetDialogueNodeVocabDisplayQry(currentDialogue.MyID));
            Debugging.PrintDbTable("DialogueNodesVocabTests");
            Debugging.PrintDbTable("DialogueNodes");
        }
            void OnMouseUpAsButton()
            {
                Debugging.PrintDbTable("QuestTaskEndCombatWithCharResults");
                string resultID = DbCommands.GenerateUniqueID("QuestTaskResults", "ResultIDs", "ResultID");

                questsUI.InsertTaskResult(resultID);
                string selectedTaskID = (questsUI.GetSelectedItemFromGroup(questsUI.selectedTask) as Task).MyID;

                DbCommands.InsertTupleToTable("QuestTaskEndCombatWithCharResults",
                                              resultID,
                                              selectedTaskID,
                                              characterName,
                                              scene
                                              );
                questsUI.DisplayResultsRelatedToTaskCompletion(selectedTaskID);
                questsUI.HideNewTaskResultPanel();
            }
예제 #4
0
        public void ActivateNewDialogue(string choiceID)
        {
            Debugging.PrintDbTable("ActivatedDialogues");
            int countDialogueActivateResults = DbCommands.GetCountFromQry(DbQueries.GetDialogueActivateCountFromChoiceIDqry(choiceID));

            if (countDialogueActivateResults > 0)
            {
                print("Dialogue ACTIVATING!!!!");
                List <string[]> dialogueActivatedList;

                DbCommands.GetDataStringsFromQry(DbQueries.GetCurrentActivateDialoguePlayerChoiceResultQry(choiceID), out dialogueActivatedList);

                foreach (string[] activatedDialogue in dialogueActivatedList)
                {
                    //get characters related to activated dialogue. Set active dialogues related to each character to completed
                    List <string[]> charactersRelatedToDialogue;

                    DbCommands.GetDataStringsFromQry(DbQueries.GetCharsRelatedToDialogue(activatedDialogue[1]), out charactersRelatedToDialogue);

                    foreach (string[] characterName in charactersRelatedToDialogue)
                    {
                        List <string[]> activeDialoguesWithCharacter;
                        string          charname = characterName[0];
                        DbCommands.GetDataStringsFromQry(DbQueries.GetActiveDialoguesWithCharacter(charname), out activeDialoguesWithCharacter, characterName[0]);

                        foreach (string[] dialogueWithChar in activeDialoguesWithCharacter)
                        {
                            string dialogueID = dialogueWithChar[0];
                            print("printing active dialogues with " + charname);
                            Debugging.PrintDbQryResults(DbQueries.GetActiveDialoguesWithCharacter(charname), charname);
                            DbCommands.UpdateTableField("ActivatedDialogues", "Completed", "1", "DialogueIDs = " + dialogueID + " AND SaveIDs = 0");
                            Debugging.PrintDbTable("ActivatedDialogues");
                        }
                    }
                    DbCommands.InsertTupleToTable("ActivatedDialogues", activatedDialogue[1], "0", "0");
                    //activate dialogues in dialogue activated list
                }
            }
        }
예제 #5
0
    public void DisplayRelatedGrammar()
    {
        List <string[]> grammarData = new List <string[]>();

        print(DbQueries.GetGrammarRelatedToVocab(enVocab, cyVocab));
        Debugging.PrintDbQryResults(DbQueries.GetGrammarRelatedToVocab(enVocab, cyVocab), enVocab, cyVocab);

        DbCommands.GetDataStringsFromQry(DbQueries.GetGrammarRelatedToVocab(enVocab, cyVocab), out grammarData, enVocab, cyVocab);
        GameObject grammarList = Instantiate(grammarListPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject;

        grammarList.transform.SetParent(gameObject.transform, false);
        foreach (string[] grammarRuleData in grammarData)
        {
            GameObject grammarRule = Instantiate(relatedGrammarPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject;
            grammarRule.transform.Find("GrammarIntro").GetComponent <Text>().text = grammarRuleData[0];
            grammarRule.transform.Find("GrammarBody").GetComponent <Text>().text  = grammarRuleData[1];
            grammarRule.transform.SetParent(grammarList.transform, false);
        }
        GetComponentInChildren <Button>().GetComponentInChildren <Image>().GetComponent <Transform>().Rotate(0, 0, -90);
        myGrammarList = grammarList;
        Canvas.ForceUpdateCanvases();
        Debugging.PrintDbTable("DiscoveredVocabGrammar");
    }