コード例 #1
0
        public static SkillString FsmStringField(GUIContent label, Skill fsm, SkillString fsmString, object[] attributes)
        {
            if (fsmString.get_UseVariable())
            {
                EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                fsmString = VariableEditor.DoFsmStringPopup(label, fsm, fsmString);
            }
            else
            {
                if (fsmString.get_Value() == null)
                {
                    fsmString.set_Value(string.Empty);
                }
                EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                UIHint uIHint = CustomAttributeHelpers.GetUIHint(attributes);
                switch (uIHint)
                {
                case 1:
                {
                    GUILayout.BeginVertical(new GUILayoutOption[0]);
                    GUILayout.Label(label, new GUILayoutOption[0]);
                    Rect rect = GUILayoutUtility.GetRect(SkillEditorContent.TempContent(fsmString.get_Value(), ""), SkillEditorStyles.TextArea, new GUILayoutOption[]
                        {
                            GUILayout.MinHeight(44f)
                        });
                    rect.set_width(340f);
                    fsmString.set_Value(EditorGUI.TextArea(rect, fsmString.get_Value()));
                    GUILayout.EndVertical();
                    goto IL_363;
                }

                case 2:
                    fsmString.set_Value(ActionEditor.EditComponentName(label, fsmString.get_Value(), typeof(Behaviour)));
                    goto IL_363;

                case 3:
                    fsmString.set_Value(ActionEditor.EditComponentName(label, fsmString.get_Value(), typeof(MonoBehaviour)));
                    ActionEditor.TrySetBehaviourContext(fsmString.get_Value());
                    goto IL_363;

                case 4:
                    fsmString.set_Value(ActionEditor.EditMethodName(label, fsmString.get_Value(), false));
                    goto IL_363;

                case 6:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.AnimationNamePopup(fsmString);
                    goto IL_363;

                case 7:
                    fsmString.set_Value(EditorGUILayout.TagField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    goto IL_363;

                case 8:
                    StringEditor.LayerNamePopup(label, fsmString, null, null);
                    goto IL_363;

                case 11:
                {
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    EditorGUI.BeginChangeCheck();
                    string text = SkillEditorGUILayout.ScriptListPopup();
                    if (EditorGUI.EndChangeCheck() && text != "")
                    {
                        fsmString.set_Value(text);
                        goto IL_363;
                    }
                    goto IL_363;
                }

                case 15:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.FsmNamePopup(fsmString);
                    goto IL_363;

                case 16:
                    fsmString.set_Value(ActionEditor.EditFsmEvent(label, fsmString.get_Value()));
                    goto IL_363;

                case 17:
                case 18:
                case 19:
                case 20:
                case 21:
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.VariablePopup(fsmString, uIHint);
                    goto IL_363;

                case 32:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.AnimatorFloatPopup(fsmString);
                    goto IL_363;

                case 33:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.AnimatorBoolPopup(fsmString);
                    goto IL_363;

                case 34:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.AnimatorIntPopup(fsmString);
                    goto IL_363;

                case 35:
                    fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
                    ActionEditor.AnimatorTriggerPopup(fsmString);
                    goto IL_363;

                case 36:
                    StringEditor.SortingLayerNamePopup(label, fsmString, null, null);
                    goto IL_363;
                }
                fsmString.set_Value(EditorGUILayout.TextField(label, fsmString.get_Value(), new GUILayoutOption[0]));
            }
IL_363:
            fsmString = (SkillString)VariableEditor.VariableToggle(fsmString, label.get_text());
            VariableEditor.EndVariableEditor(fsmString);
            return(fsmString);
        }