Exemplo n.º 1
0
 internal static void Release(GraphDictionary store)
 {
     store.Input.ClearVariables();
     store.Output.ClearVariables();
     store.Local.ClearVariables();
     _pool.Release(store);
 }
Exemplo n.º 2
0
        public IEnumerator Execute()
        {
            var store = GraphDictionary.Reserve();

            yield return(Execute(store));

            GraphDictionary.Release(store);
        }
Exemplo n.º 3
0
        public IEnumerator Execute(IVariableDictionary variables)
        {
            if (Graph)
            {
                var store = GraphDictionary.Reserve();
                store.WriteInputs(this, Inputs, variables);
                store.WriteOutputs(Outputs);

                yield return(Graph.Execute(store));

                store.ReadOutputs(this, Outputs, variables);
                GraphDictionary.Release(store);
            }
        }
Exemplo n.º 4
0
        public IEnumerator Execute(GraphDictionary variables)
        {
            if (IsRunning)
            {
                Debug.LogErrorFormat(this, _graphAlreadyRunningError, name);
            }
            else
            {
                Variables = variables;
                IsRunning = true;

                yield return(CompositionManager.Track(this, Run(StartNode, Variables, "Start")));

                IsRunning = false;
                Variables = null;
            }
        }