/// <summary>
        /// The constructor will only ever be called in editor.
        /// </summary>
        public NodeGraph()
        {
            NodeCollection = new NodeCollection();
            ANode entryNode = NodeCollection.CreateNode(typeof(EntryNode), Vector2.zero);

            NodeCollection.SetEntryNode(entryNode.Id);
            BlackboardProperties = new BlackboardProperties();
        }
Exemple #2
0
 public GraphControls(AGraphProperties graphProperties,
                      BlackboardProperties blackboardProperties,
                      Action <OutportEdge> onTraverseEdge)
 {
     GraphProperties      = graphProperties;
     BlackboardProperties = blackboardProperties;
     m_onTraverseEdge     = onTraverseEdge;
 }
Exemple #3
0
        public GraphRunner(NodeGraph nodeGraph, AGraphProperties graphProperties, BlackboardProperties blackboardProperties)
        {
            m_nodeCollection     = nodeGraph.NodeCollection;
            GraphProperties      = graphProperties;
            BlackboardProperties = blackboardProperties;

            graphControls = new GraphControls(GraphProperties, BlackboardProperties, TraverseEdge);

            if (m_nodeCollection == null)
            {
                Debug.LogError("No Graph attached to GraphRunner!");
            }
        }
Exemple #4
0
 public GraphRunner(NodeCollection nodeCollection, AGraphProperties graphProperties, BlackboardProperties blackboardProperties)
 {
     m_nodeCollection     = nodeCollection;
     GraphProperties      = graphProperties;
     BlackboardProperties = blackboardProperties;
 }