Exemple #1
0
 protected virtual void OnEnable()
 {
     rewardsContentGUI = new QuestContentListInspectorGUI(new GUIContent("Dialogue for Rewards Section", "Show this UI content above the list of rewards offered for a quest."), QuestContentCategory.Dialogue);
     rewardSystemList  = new ReorderableList(serializedObject, serializedObject.FindProperty("m_rewardSystems"), true, true, true, true);
     rewardSystemList.drawHeaderCallback    += OnDrawRewardSystemListHeader;
     rewardSystemList.drawElementCallback   += OnDrawRewardSystemListElement;
     rewardSystemList.onAddDropdownCallback += OnRewardSystemListAddDropdown;
     rewardSystemList.onRemoveCallback      += OnRewardSystemListRemove;
 }
Exemple #2
0
        private void DrawOfferConditions(SerializedObject serializedObject)
        {
            UnityEngine.Assertions.Assert.IsNotNull(serializedObject, "Quest Machine: Internal error - serializedObject is null.");
            QuestEditorPrefs.offerFoldout = QuestEditorUtility.EditorGUILayoutFoldout("Offer", "Conditions that must be true before the quest giver can offer the quest.", QuestEditorPrefs.offerFoldout);
            if (!QuestEditorPrefs.offerFoldout)
            {
                return;
            }

            try
            {
                QuestEditorUtility.EditorGUILayoutBeginGroup();
                EditorGUILayout.HelpBox("If you specify conditions below, then they must be true before the quest giver can offer the quest.", MessageType.None);
                if (m_offerConditionSetInspectorGUI == null)
                {
                    m_offerConditionSetInspectorGUI = new QuestConditionSetInspectorGUI();
                }
                m_offerConditionSetInspectorGUI.Draw(serializedObject.FindProperty("m_offerConditionSet"));
                if (m_offerConditionsUnmetContentListDrawer == null)
                {
                    m_offerConditionsUnmetContentListDrawer =
                        new QuestContentListInspectorGUI(new GUIContent("Offer Conditions Unmet Text", "Show this dialogue content when the offer conditions are unmet."), QuestContentCategory.OfferConditionsUnmet);
                }
                if (m_offerContentListDrawer == null)
                {
                    m_offerContentListDrawer =
                        new QuestContentListInspectorGUI(new GUIContent("Offer Text", "Show this dialogue text to offer the quest to the player."), QuestContentCategory.Offer);
                }
                m_offerConditionsUnmetContentListDrawer.Draw(serializedObject, serializedObject.FindProperty("m_offerConditionsUnmetContentList"), true);
                m_offerContentListDrawer.Draw(serializedObject, serializedObject.FindProperty("m_offerContentList"), true);
            }
            finally
            {
                QuestEditorUtility.EditorGUILayoutEndGroup();
            }
        }
Exemple #3
0
 public CategorizedQuestContentInspectorGUI()
 {
     m_dialogueContentListDrawer = new QuestContentListInspectorGUI(new GUIContent("Dialogue Text", "Content shown in the dialogue UI."), QuestContentCategory.Dialogue);
     m_journalContentListDrawer  = new QuestContentListInspectorGUI(new GUIContent("Journal Text", "Content shown in the player's quest journal."), QuestContentCategory.Journal);
     m_hudContentListDrawer      = new QuestContentListInspectorGUI(new GUIContent("HUD Text", "Content shown in the player's quest tracking HUD."), QuestContentCategory.HUD);
 }
 protected override void OnEnable()
 {
     base.OnEnable();
     contentListDrawer = new QuestContentListInspectorGUI(new GUIContent("Alert Text", "This UI content is shown in the alert UI when this state is enabled."), QuestContentCategory.Alert);
 }