示例#1
0
        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);
        }
示例#2
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);
        }
示例#3
0
        protected virtual void OnEnable()
        {
            runGameActions = (RunGameActions)target;

            // get serialized objects so we can use attached property drawers (e.g. tooltips, ...)
            _automaticallyRunProperty = serializedObject.FindProperty("_automaticallyRun");
            _actionReferencesProperty = serializedObject.FindProperty("_actionReferences");

            // setup actions types
            _gameActionClassDetails = GameActionEditorHelper.FindTypesClassDetails();
        }
示例#4
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");
        }
示例#5
0
        protected virtual void OnEnable()
        {
            conditionalAction = (ConditionalAction)target;

            // get serialized objects so we can use attached property drawers (e.g. tooltips, ...)
            _conditionReferencesProperty                     = serializedObject.FindProperty("_conditionReferences");
            _actionReferencesConditionMetProperty            = serializedObject.FindProperty("_actionReferencesConditionMet");
            _actionReferencesConditionMetCallbackProperty    = serializedObject.FindProperty("_actionReferencesConditionMetCallback");
            _actionReferencesConditionNotMetProperty         = serializedObject.FindProperty("_actionReferencesConditionNotMet");
            _actionReferencesConditionNotMetCallbackProperty = serializedObject.FindProperty("_actionReferencesConditionNotMetCallback");

            // setup actions types
            _gameActionClassDetails    = GameActionEditorHelper.FindTypesClassDetails();
            _gameConditionClassDetails = GameConditionEditorHelper.FindTypesClassDetails();
        }
示例#6
0
        protected virtual void OnEnable()
        {
            gameCollider = (GameCollider)target;

            // get serialized objects so we can use attached property drawers (e.g. tooltips, ...)
            _collidingTagProperty         = serializedObject.FindProperty("_collidingTag");
            _intervalProperty             = serializedObject.FindProperty("_interval");
            _disableAfterUseProperty      = serializedObject.FindProperty("_disableAfterUse");
            _onlyWhenLevelRunningProperty = serializedObject.FindProperty("_onlyWhenLevelRunning");
            _enterProperty         = serializedObject.FindProperty("_enter");
            _processWithinProperty = serializedObject.FindProperty("_processWithin");
            _runIntervalProperty   = serializedObject.FindProperty("_runInterval");
            _withinProperty        = serializedObject.FindProperty("_within");
            _exitProperty          = serializedObject.FindProperty("_exit");

            // setup actions types
            _gameActionClassDetails = GameActionEditorHelper.FindTypesClassDetails();
        }