Exemple #1
0
        protected void DrawGUI()
        {
            _mainHelpRect = EditorHelper.ShowHideableHelpBox("GameFramework.RunActionsEditor", "Use this component run Game Actions either automatically or through a callback from another component.", _mainHelpRect);

            EditorGUILayout.PropertyField(_automaticallyRunProperty);
            GameActionEditorHelper.DrawActions(serializedObject, _actionReferencesProperty, runGameActions.ActionReferences,
                                               ref actionEditors, _gameActionClassDetails, null);
        }
        void DrawTriggerData(SerializedProperty triggerDataProperty, GameActionReference[] actionReferences, ref GameActionEditor[] actionEditors, string heading = null, string tooltip = null)
        {
            var actionsProperty  = triggerDataProperty.FindPropertyRelative("_actionReferences");
            var callbackProperty = triggerDataProperty.FindPropertyRelative("_callback");

            GameActionEditorHelper.DrawActions(serializedObject, actionsProperty, actionReferences,
                                               ref actionEditors, _gameActionClassDetails, callbackProperty, heading, tooltip);
        }
Exemple #3
0
        protected void DrawGUI()
        {
            _mainHelpRect = EditorHelper.ShowHideableHelpBox("GameFramework.ConditionalActionEditor", "With this component you can configure actions that should be taken based upon different conditions that might occur.\nMore conditions and actions will come over time - if there is something you are missing then let us know. Alternatively easily create your own custom actions or add a callback .", _mainHelpRect);

            GameConditionEditorHelper.DrawConditions(serializedObject, _conditionReferencesProperty, conditionalAction.ConditionReferences,
                                                     ref conditionEditors, _gameConditionClassDetails, "Conditions", "Conditions that should be tested.");

            GameActionEditorHelper.DrawActions(serializedObject, _actionReferencesConditionMetProperty, conditionalAction.ActionReferencesConditionMet,
                                               ref actionEditorsMet, _gameActionClassDetails, _actionReferencesConditionMetCallbackProperty, heading: "Condition Met", tooltip: "Actions that will be run when the condition is met");

            GameActionEditorHelper.DrawActions(serializedObject, _actionReferencesConditionNotMetProperty, conditionalAction.ActionReferencesConditionNotMet,
                                               ref actionEditorsNotMet, _gameActionClassDetails, _actionReferencesConditionNotMetCallbackProperty, heading: "Condition Not Met", tooltip: "Actions that will be run when the condition is not met");
        }