Beispiel #1
0
    private void refreshQuest(QuestSystem.Quest q)

    {
        for (int j = 0; j < q.Objectives.Count; j++)

        {
            dicQuestReminder[q].transform.GetChild(1 + j).GetChild(0).GetChild(0).gameObject.SetActive(q.Objectives[j].IsComplete);
        }
    }
Beispiel #2
0
    public bool IsQuestAssigned()
    {
        bool isQuestAssigned = false;

        quest = questController.assignedQuests.Find(quest => quest.slug == this.questName);
        if (quest != null)
        {
            isQuestAssigned = true;
        }

        return(isQuestAssigned);
    }
Beispiel #3
0
 public void Interact()
 {
     if (questName != "")
     {
         //make sure not currently on the quest:
         if (quest == null)
         {
             dialogue.StartDialogue(dialogueData.dialogue);
             quest = questController.AssignQuest(questName);
         }
     }
 }
Beispiel #4
0
    private void addQuest(QuestSystem.Quest q)

    {
        GameObject newQuest = Instantiate(prefabQuestElement, container);

        newQuest.transform.localScale = Vector3.one;

        switch (q.Identifier.ID)

        {
        case "main_quest_01":

            newQuest.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = iconAshley;

            break;

        case "side_quest_01":

            newQuest.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = iconRaspberry;

            break;

        case "side_quest_ducklings_01":

            newQuest.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = iconDucky;

            break;
        }

        newQuest.GetComponentInChildren <Text>().text = q.Information.Title;



        GameObject newObjective;

        for (int i = 0; i < q.Objectives.Count; i++)

        {
            newObjective = Instantiate(prefabQuestObjective, newQuest.transform);

            newObjective.transform.localScale = Vector3.one;

            newObjective.GetComponentInChildren <Text>().text = q.Objectives[i].Title;
        }
        dicQuestReminder.Add(q, newQuest);
    }
Beispiel #5
0
    public void Interact(Character player = null)
    {
        this.player = player;
        if (
            GetComponent <BattleLaunchCharacter>() != null &&
            IsCharacterMalfunctiongAndroidOrIsTheAndroidDefeated()
            )
        {
            EventController.OnDialogPanelClosed += StartBattle;
        }
        if (questName != "") // If NPC gives a quest
        {
            if (quest == null && !IsQuestAssigned() && !IsQuestCompleted())
            {
                quest = questController.AssignQuest(questName);
            }
            if (quest == null && questCompletedDialogData != null)
            {
                dialogData = questCompletedDialogData;
            }
        }
        if (dialogData != null)
        {
            if (dialog == null)
            {
                FindDialogPanel();
            }
            if (IsCharacterMalfunctiongAndroidOrIsTheAndroidDefeated())
            {
                if (gateway == null)
                {
                    dialog.StartDialog(dialogData.dialog);
                }
                else if (gateway != null && !gateway.isActive)
                {
                    dialog.StartDialog(dialogData.dialog);
                }
            }

            EventController.OnDialogPanelClosed += UnfreezeTime;
        }
    }
 private void HideItemPreview(QuestSystem.Quest quest)
 {
     quest.OnQuestComplete  -= HideItemPreview;
     currentlyDisplayedQuest = null;
     ResetPreviewItems();
 }
Beispiel #7
0
 public static void QuestSetToPending(QuestSystem.Quest quest)
 {
     OnQuestSetToPending(quest);
 }
Beispiel #8
0
 public static void QuestCompleted(QuestSystem.Quest quest)
 {
     OnQuestCompleted(quest);
 }
Beispiel #9
0
 public static void QuestProgressChanged(QuestSystem.Quest quest)
 {
     OnQuestProgressChanged(quest);
 }