/// <summary> /// Unregisters a QuestListContainer. /// </summary> /// <param name="qlc">QuestListContainer to unregister.</param> public static void UnregisterQuestListContainer(IdentifiableQuestListContainer qlc) { if (qlc == null) { return; } var id = StringField.GetStringValue(qlc.id); if (m_questListContainers.ContainsKey(id)) { m_questListContainers.Remove(id); } }
// Quest List Containers include questers (QuestJournal) and quest givers (QuestGiver). /// <summary> /// Registers a QuestListContainer for easy lookup. /// </summary> /// <param name="qlc">QuestListContainer to register.</param> public static void RegisterQuestListContainer(IdentifiableQuestListContainer qlc) { if (qlc == null) { return; } var id = StringField.GetStringValue(qlc.id); if (m_questListContainers.ContainsKey(id)) { Debug.LogWarning("Quest Machine: A QuestListContainer with id '" + id + "' is already registered. Can't register " + qlc, qlc); } else { m_questListContainers.Add(id, qlc); } }
public virtual void Awake() { m_questListContainer = GetComponent <IdentifiableQuestListContainer>(); }