public override void Interact() { switch (NPCsQuest.goal.questState) { case QuestState.Available: questManager.AcceptQuest(NPCsQuest); dialogue.currentDialogue = dialogueText; dialogue.quest = NPCsQuest; dialogue.showDialogue = true; break; case QuestState.Active: if (NPCsQuest.goal.isCompleted()) { questManager.ClaimQuest(); Debug.Log("Accepted"); } break; case QuestState.Claimed: Debug.Log("Claimed"); //dialogue break; } if (NPCsQuest.goal.questState == QuestState.Available) { questManager.AcceptQuest(NPCsQuest); Debug.Log("Quest giver NPC"); } }
public override void Interact() { if (NPCsQuest.goal.questState == QuestState.Available) { dialogue.showDialogue = true; dialogue.currentLineIndex = 0; if (dialogue.currentLineIndex == 2) { dialogue.showDialogue = false; } } if (NPCsQuest.goal.questState == QuestState.Claimed) { dialogue.showDialogue = true; dialogue.currentLineIndex = 2; } switch (NPCsQuest.goal.questState) { case QuestState.Available: questManager.AcceptQuest(NPCsQuest); Debug.Log("Accepted"); break; case QuestState.Active: if (NPCsQuest.goal.isCompleted()) { Debug.Log("Claimed"); questManager.ClaimQuest(); } else { Debug.Log("Not Claimed"); } break; case QuestState.Claimed: dialogue.currentLineIndex = 2; break; } if (NPCsQuest.goal.questState == QuestState.Available) { questManager.AcceptQuest(NPCsQuest); } }
public IEnumerator GiveQuest() { foreach (Quest availableQuest in availableQuests) { yield return(StartCoroutine(_questManager.AcceptQuest(availableQuest))); } }
//Depending on type of quest, interact differently with that quest NPC public override void Interact() { switch (NPCsQuest.goal.questState) { case QuestState.Available: questManager.AcceptQuest(NPCsQuest); Debug.Log("Quest Accepted"); break; case QuestState.Active: if (NPCsQuest.goal.isCompleted()) { Debug.Log("Quest Completed!"); questManager.ClaimQuest(); } else { Debug.Log("Quest not claimed"); } break; case QuestState.Claimed: dialogue.name = npcName; dialogue.dialogueText = completeText; dialogue.ShowDialogue(); break; } }
protected override void EndDialogue() { if (GUI.Button(new Rect(15 * scr.x, 8.5f * scr.y, scr.x, scr.y * 0.5f), "Accept")) { Debug.Log("Accept quest here"); questManager.AcceptQuest(quest); showDialogue = false; currentLineIndex = 0; playerMovement.enabled = true; } if (GUI.Button(new Rect(13f * scr.x, 8.5f * scr.y, scr.x, scr.y * 0.5f), "Don't Accept")) { Debug.Log("Accept quest here"); showDialogue = false; currentLineIndex = 0; playerMovement.enabled = true; } }
public void btnAccept() { // this button will start the quest. Sets up the indicators of monsters, and tell the game that quest has been activated questManager.AcceptQuest(); }
public void AcceptQuest(Quest quest) { theQM.AcceptQuest(quest); }