コード例 #1
0
ファイル: GraphFlow.cs プロジェクト: ByteDecoder/Veranda
        private IEnumerator Run(IGraph graph, IFlowRootNode node)
        {
            // TODO: there is something strange here with a connected flow of nodes > 800 that causes a crash
            //Stopwatch stopWatch = new Stopwatch();
            //stopWatch.Start();

            foreach (var port in node.FlowOutPorts)
            {
                yield return(FollowConnections(graph, node, port));
            }

            //stopWatch.Stop();
            //TimeSpan ts = stopWatch.Elapsed;
            //Debug.Log($"RunTime {ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds / 10:00}");
            //yield return new WaitForSeconds(0.2f);
        }
コード例 #2
0
ファイル: GraphFlow.cs プロジェクト: ByteDecoder/Veranda
        public IEnumerator Execute(IGraph graph, IFlowRootNode node)
        {
            int count = graph.NodeCount;

            Data      = new Dictionary <string, object>(count);
            NodeState = new Dictionary <string, bool>(count);
            foreach (var n in graph.Nodes)
            {
                NodeState[n.Id] = false;
            }

            _stack  = 0;
            _cycles = 0;

            // Begin Execution of OutPorts on root node
            yield return(Run(graph, node));
        }
コード例 #3
0
 public IEnumerator Execute(IFlowRootNode node)
 {
     // TODO: Kill existing running flows?
     //Debug.Log($"Beginning Flow on: '{Name}' at RootNode '{node}'");
     yield return(new TFlow().Execute(this, node));
 }