public abstract void DrawCurve(BaseNode b);
        private void OnGUI()
        {
            if (Selection.activeTransform != null)
            {
                currentStateManager = Selection.activeTransform.GetComponentInChildren <StateManager> ();
                if (prevStateManager != currentStateManager)
                {
                    prevStateManager = currentStateManager;
                    Repaint();
                }
            }



            Event e = Event.current;

            mousePosition = e.mousePosition;
            UserInput(e);

            DrawWindows();

            if (e.type == EventType.MouseDrag)
            {
                if (settings.currentGraph != null)
                {
                    //settings.currentGraph.DeleteWindowsThatNeedTo();
                    Repaint();
                }
            }

            if (GUI.changed)
            {
                settings.currentGraph.DeleteWindowsThatNeedTo();
                Repaint();
            }

            if (settings.makeTransition)
            {
                mouseRect.x = mousePosition.x;
                mouseRect.y = mousePosition.y;
                Rect from = settings.currentGraph.GetNodeWithIndex(transitFromId).windowRect;
                DrawNodeCurve(from, mouseRect, true, Color.blue);
                Repaint();
            }

            if (forceSetDirty)
            {
                forceSetDirty = false;
                EditorUtility.SetDirty(settings);
                EditorUtility.SetDirty(settings.currentGraph);

                for (int i = 0; i < settings.currentGraph.windows.Count; i++)
                {
                    BaseNode n = settings.currentGraph.windows[i];
                    if (n.stateReference.currentState != null)
                    {
                        EditorUtility.SetDirty(n.stateReference.currentState);
                    }
                }
            }
        }
 public abstract void DrawWindow(BaseNode b);
        public static BaseNode AddTransitionNodeFromTransition(Transition transition, BaseNode enterNode, Vector3 pos)
        {
            BaseNode transNode = settings.AddNodeOnGraph(settings.transitionNode, 200, 100, "Condition", pos);

            transNode.enterNode             = enterNode.id;
            transNode.transRef.transitionId = transition.id;
            return(transNode);
        }