コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        // 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);
            }
        }
コード例 #3
0
 public virtual void Awake()
 {
     m_questListContainer = GetComponent <IdentifiableQuestListContainer>();
 }