public override void OnEnter(Node previousActiveNode, Connection connection)
        {
            base.OnEnter(previousActiveNode, connection);
            if (ActiveGraph == null)
            {
                return;
            }
            if (ErrorNoGraphReferenced)
            {
                return;
            }
            if (ErrorReferencedGraphIsNotSubGraph)
            {
                return;
            }
            var enterNode = m_subGraph.GetEnterNode() as EnterNode;

            if (enterNode == null)
            {
                return;
            }
            ActiveGraph.DeactivateGlobalNodes();
            ActiveGraph.ActiveSubGraph    = m_subGraph;
            m_subGraph.ParentGraph        = ActiveGraph;
            m_subGraph.ParentSubGraphNode = this;
            m_subGraph.SetActiveNode(enterNode, null);
        }
示例#2
0
 public override void OnEnter(Node previousActiveNode, Connection connection)
 {
     base.OnEnter(previousActiveNode, connection);
     if (ActiveGraph == null)
     {
         return;
     }
     if (ActiveGraph.ParentGraph == null)
     {
         return;
     }
     if (ActiveGraph.ParentSubGraphNode == null)
     {
         return;
     }
     ActiveGraph.DeactivateGlobalNodes();
     ActiveGraph.ParentSubGraphNode.ExitSubGraphNode();
 }