void Start() { mUniqueId = GetComponent <UniqueId>(); Dictionary <string, QuestGiver.SavedState> questGivers = GameController.Instance.questGivers; if (questGivers.ContainsKey(mUniqueId.guid)) { SavedState state = questGivers[mUniqueId.guid]; if (state.allFinished) { endQuestElement = null; } } }
public override void Interact() { var gameController = GameController.Instance; if (gameController.activeQuests.Contains(quest)) { return; } if (!gameController.completedQuests.Contains(quest)) { startQuestElement.Run(); } else { endQuestElement.Run(); endQuestElement = null; SavedState s = new SavedState(); s.allFinished = true; GameController.Instance.questGivers[mUniqueId.guid] = s; } }
public void DisplayDialogMessage(string message, AbstractQuestElement next) { state = State.DialogMessage; mNextQuestElement = next; dialogMessageText.text = message; }