Esempio n. 1
0
 public void InitGraphView(BaseGraphView graphViewPrefab, Transform parent, NodeTemplate nodeTemplate, EdgeTemplate edgeTemplate)
 {
     GraphView = Instantiate(graphViewPrefab, parent, false);
     GraphView.NodeTemplate = nodeTemplate;
     GraphView.EdgeTemplate = edgeTemplate;
     GraphView.MouseDown   += GraphView_MouseDown;
     GraphView.MouseMove   += GraphView_MouseMove;
     GraphView.MouseUp     += GraphView_MouseUp;
     GraphView.SetGraph(NodePresenters, EdgePresenters);
 }
Esempio n. 2
0
 public void InitGraphViews(BaseGraphView graphViewPrefab, Transform parent, NodeTemplate nodeTemplate, EdgeTemplate edgeTemplate)
 {
     foreach (var chunk in _chunks)
     {
         chunk.InitGraphView(graphViewPrefab, parent, nodeTemplate, edgeTemplate);
         var center = _min + _chunkRange * 0.5f +
                      new Vector3(
             _chunkRange.x * chunk.Index.x,
             _chunkRange.y * chunk.Index.y,
             _chunkRange.z * chunk.Index.z
             );
         chunk.GraphView.SetBounds(center, _chunkRange);
         chunk.GraphView.name = "GraphView " + chunk.Index;
     }
 }
Esempio n. 3
0
 protected virtual void SetEdgeTemplate(EdgeTemplate edgeTemplate)
 {
     _edgeTemplate = edgeTemplate;
 }