protected override void OnInspectorGUI()
        {
            GPConditionNOT condition = (GPConditionNOT)Condition;

            EditorGUI.indentLevel++;

            EditorGUILayout.LabelField("NOT", EditorStyles.toolbarButton, GUILayout.Width(200), GUILayout.Height(30));

            GPCondition cA = condition.A;

            m_selectedAIndex = GPConditionInspector.CreateConditionField(ref cA, m_selectedAIndex, condition.Handler);
            condition.A      = cA;

            if (m_aInspector == null && condition.A != null)
            {
                m_aInspector = GPConditionInspector.CreateInspector(condition.A);
            }

            if (m_aInspector != null)
            {
                m_aInspector.DrawInspector();
            }

            EditorGUI.indentLevel--;
        }
示例#2
0
        public static GPConditionInspector CreateInspector(GPCondition condition)
        {
            GPConditionInspector insp = (GPConditionInspector)System.Activator.CreateInstance(
                GPConditionInspectorManager.InspectorTypeForCondition(condition));

            insp.Condition = condition;

            return(insp);
        }
示例#3
0
        protected override void OnInspectorGUI()
        {
            GPActionIf actionCondition = (GPActionIf)TargetAction;

            if (actionCondition._condition == null)
            {
                m_creationIndex = GPConditionInspector.CreateConditionField(ref actionCondition._condition,
                                                                            m_creationIndex,
                                                                            TargetAction.ParentHandler);
            }

            if (m_conditionInsp == null && actionCondition._condition != null)
            {
                m_conditionInsp = GPConditionInspector.CreateInspector(actionCondition._condition);
            }

            if (m_conditionInsp != null)
            {
                m_conditionInsp.DrawInspector();
            }
        }