Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        questText     = GetComponent <QuestText>();
        questList     = questText.QuestList;
        mainQuestList = questText.MainQuestList;
        navigator     = FindObjectOfType <QuestNavigations>();
        logActivity   = GetComponent <QuestLogActivity>();

        if (questStarted)
        {
            navigator.GetComponent <QuestNavigations>().setLocationForQuest();
            startText.SetActive(false);
            questFieldMain.SetActive(true);
            questField1.SetActive(true);
            questField2.SetActive(true);
            questField3.SetActive(true);
            questField4.SetActive(true);
            questField5.SetActive(true);
            questText.AddQuestsToList();
            ChangeDisplayedQuests(questNumber);
            ChangeDisplayMainQuests(mainQuestNumber);
        }
        else
        {
            questFieldMain.SetActive(false);
            questField1.SetActive(false);
            questField2.SetActive(false);
            questField3.SetActive(false);
            questField4.SetActive(false);
            questField5.SetActive(false);
        }
        StartQuest();
    }
Exemple #2
0
 public void StartQuest()
 {
     if (!questStarted && logActivity.active)
     {
         questStarted = true;
         navigator.GetComponent <QuestNavigations>().setLocationForQuest();
         startText.SetActive(false);
         questFieldMain.SetActive(true);
         questField1.SetActive(true);
         questField2.SetActive(true);
         questField3.SetActive(true);
         questField4.SetActive(true);
         questField5.SetActive(true);
         questText.AddQuestsToList();
         ChangeDisplayedQuests(questNumber);
         ChangeDisplayMainQuests(mainQuestNumber);
     }
 }