Пример #1
0
        public override bool OnInspectorDraw(PInspectorCore insp, params object[] arg)
        {
            FireFxTreeDebuger d = arg.Length > 0 ? arg[0] as FireFxTreeDebuger : null;

            switch (insp.propertyName)
            {
            case "anim":
                DrawAnim(d, insp as Insp_TextInput);
                return(true);

            case "paramName":
                DrawParameter(d, insp as Insp_TextInput);
                return(true);

            case "paramValue":
                return(DrawParamValue(insp as Insp_Float));

            case "paramType":
                return(animTarget == AnimatorTarget.Host);

            case "bone":
                DrawBone(d, insp as Insp_TextInput);
                return(true);

            case "autoBlock":
                return(actionType != AnimatorActionType.Play);
            }
            return(false);
        }
 internal void OnEnable()
 {
     _debuger    = target as FireFxTreeDebuger;
     _listDrawer = new ArrayListDrawer("targets");
     UpdateHost();
     TreeCenter.selection.selectionChanged -= OnSelectChanged;
     TreeCenter.selection.selectionChanged += OnSelectChanged;
 }
Пример #3
0
        public override bool OnInspectorDraw(PInspectorCore insp, params object[] arg)
        {
            FireFxTreeDebuger d = arg.Length > 0 ? arg[0] as FireFxTreeDebuger : null;

            if (insp.propertyName == "boneName")
            {
                DrawBone(d, insp as Insp_TextInput);
                return(true);
            }
            return(false);
        }
Пример #4
0
        private void DrawBone(FireFxTreeDebuger d, Insp_TextInput insp)
        {
            if (d == null || insp == null || animTarget == AnimatorTarget.Host)
            {
                return;
            }
            EditorGUI.BeginChangeCheck();
            string st = BoneGUI.BoneField(d.hero, insp.label, bone);

            if (EditorGUI.EndChangeCheck())
            {
                insp.SetValueString(st);
            }
        }
Пример #5
0
        private void DrawAnim(FireFxTreeDebuger d, Insp_TextInput insp)
        {
            if (d == null || insp == null || actionType != AnimatorActionType.Play)
            {
                return;
            }
            if (animTarget != AnimatorTarget.Host)
            {
                anim = EditorGUILayout.TextField(insp.label, anim);
                return;
            }
            EditorGUI.BeginChangeCheck();
            string st = AnimatorGUI.StateField(d.hero, insp.label, anim);

            if (EditorGUI.EndChangeCheck())
            {
                insp.SetValueString(st);
            }
        }
Пример #6
0
        private void DrawParameter(FireFxTreeDebuger d, Insp_TextInput insp)
        {
            if (d == null || insp == null || actionType == AnimatorActionType.Play)
            {
                return;
            }
            if (animTarget != AnimatorTarget.Host)
            {
                paramName = EditorGUILayout.TextField(insp.label, paramName);
                return;
            }
            EditorGUI.BeginChangeCheck();
            string st = AnimatorGUI.ParameterField(d.hero, insp.label, paramName);

            if (EditorGUI.EndChangeCheck())
            {
                insp.SetValueString(st);
                AnimatorControllerParameter p = EditAnimatorUtils.GetAnimParameter(d.hero, st);
                if (p != null)
                {
                    paramType = p.type;
                }
            }
        }