Пример #1
0
        public override void DrawCommandGUI()
        {
            serializedObject.Update();

            Call t = target as Call;

            Flowchart flowchart = null;

            if (targetFlowchartProp.objectReferenceValue == null)
            {
                flowchart = (Flowchart)t.GetFlowchart();
            }
            else
            {
                flowchart = targetFlowchartProp.objectReferenceValue as Flowchart;
            }

            EditorGUILayout.PropertyField(targetFlowchartProp);

            if (flowchart != null)
            {
                BlockEditor.BlockField(targetBlockProp,
                                       new GUIContent("Target Block", "Block to call"),
                                       new GUIContent("<None>"),
                                       flowchart);

                EditorGUILayout.PropertyField(startLabelProp);

                EditorGUILayout.PropertyField(startIndexProp);
            }

            EditorGUILayout.PropertyField(callModeProp);

            serializedObject.ApplyModifiedProperties();
        }
Пример #2
0
        public override void DrawCommandGUI()
        {
            var flowchart = FlowchartWindow.GetFlowchart();

            if (flowchart == null)
            {
                return;
            }

            serializedObject.Update();

            EditorGUILayout.PropertyField(textProp);

            EditorGUILayout.PropertyField(descriptionProp);

            BlockEditor.BlockField(targetBlockProp,
                                   new GUIContent("Target Block", "Block to call when option is selected"),
                                   new GUIContent("<None>"),
                                   flowchart);

            EditorGUILayout.PropertyField(hideIfVisitedProp);
            EditorGUILayout.PropertyField(interactableProp);
            EditorGUILayout.PropertyField(setMenuDialogProp);
            EditorGUILayout.PropertyField(hideThisOptionProp);

            serializedObject.ApplyModifiedProperties();
        }
Пример #3
0
        public override void DrawCommandGUI()
        {
            if (flowchart == null)
            {
                return;
            }

            serializedObject.Update();

            EditorGUILayout.PropertyField(csvCommandKeyProp);
            EditorGUILayout.PropertyField(textProp);

            EditorGUILayout.PropertyField(descriptionProp);

            BlockEditor.BlockField(targetBlockProp,
                                   new GUIContent("Target Block", "Block to call when option is selected"),
                                   new GUIContent("<None>"),
                                   flowchart);

            EditorGUILayout.PropertyField(hideIfVisitedProp);
            EditorGUILayout.PropertyField(interactableProp);
            EditorGUILayout.PropertyField(setMenuDialogProp);
            EditorGUILayout.PropertyField(hideThisOptionProp);

            MenuExtend t = target as MenuExtend;

            EditorGUILayout.PropertyField(HasConditionProp);

            if (t.HasCondition == true)
            {
                EditorGUILayout.PropertyField(requireValueProp, new GUIContent("Require Gold"));
            }

            serializedObject.ApplyModifiedProperties();
        }
Пример #4
0
        public override void DrawCommandGUI()
        {
            var flowchart = FlowchartWindow.GetFlowchart();

            if (flowchart == null)
            {
                return;
            }

            serializedObject.Update();

            EditorGUILayout.PropertyField(textProp);

            EditorGUILayout.PropertyField(descriptionProp);

            EditorGUILayout.BeginHorizontal();
            BlockEditor.BlockField(targetBlockProp,
                                   new GUIContent("Target Block", "Block to call when option is selected"),
                                   new GUIContent("<None>"),
                                   flowchart);
            const int popupWidth = 17;

            if (targetBlockProp.objectReferenceValue == null && GUILayout.Button("+", GUILayout.MaxWidth(popupWidth)))
            {
                var fw = EditorWindow.GetWindow <FlowchartWindow>();
                var t  = (Menu)target;
                var activeFlowchart = t.GetFlowchart();
                var newBlock        = fw.CreateBlockSuppressSelect(activeFlowchart, t.ParentBlock._NodeRect.position - Vector2.down * 60);
                targetBlockProp.objectReferenceValue = newBlock;
                activeFlowchart.SelectedBlock        = t.ParentBlock;
            }
            EditorGUILayout.EndHorizontal();



            EditorGUILayout.PropertyField(hideIfVisitedProp);
            EditorGUILayout.PropertyField(interactableProp);
            EditorGUILayout.PropertyField(setMenuDialogProp);
            EditorGUILayout.PropertyField(hideThisOptionProp);

            serializedObject.ApplyModifiedProperties();
        }
Пример #5
0
        public override void DrawCommandGUI()
        {
            var flowchart = FlowchartWindow.GetFlowchart();

            if (flowchart == null)
            {
                return;
            }

            serializedObject.Update();

            EditorGUILayout.PropertyField(durationProp);

            BlockEditor.BlockField(targetBlockProp,
                                   new GUIContent("Target Block", "Block to call when timer expires"),
                                   new GUIContent("<None>"),
                                   flowchart);

            serializedObject.ApplyModifiedProperties();
        }
        public override void DrawCommandGUI()
        {
            serializedObject.Update();

            FungusChangeGameState t         = target as FungusChangeGameState;
            Flowchart             flowchart = t.GetFlowchart();

            if (flowchart != null)
            {
                BlockEditor.BlockField(succededBlockProp,
                                       new GUIContent("Succeded Block", "Block to call"),
                                       new GUIContent("<None>"),
                                       flowchart);

                BlockEditor.BlockField(failedBlockProp,
                                       new GUIContent("Failed Block", "Block to call"),
                                       new GUIContent("<None>"),
                                       flowchart);
            }
            serializedObject.ApplyModifiedProperties();
            base.DrawCommandGUI();
        }