Ejemplo n.º 1
0
        public virtual void PostExecution(int step, SGIO tobeMerged)
        {
            SGIO tempOut = new SGIO();

            tempOut = SGIO.Merge(subNodes[step].outputs, tobeMerged);


            if (step >= stagedOutputs.Count)
            {
                stagedOutputs.Add(tempOut);
            }
            else
            {
                stagedOutputs[step] = tempOut;
            }
        }
Ejemplo n.º 2
0
        public void PostExecution(int step, SGIO tobeMerged)
        {
            SGIO tempOut = new SGIO();

            tempOut = SGIO.Merge(rules[step].outputs, tobeMerged);

            if (step >= stagedOutputs.Count)
            {
                stagedOutputs.Add(tempOut);
            }
            else
            {
                //remove outdated objects
                foreach (ShapeObject o in stagedOutputs[step].shapes)
                {
                    if (!tempOut.shapes.Contains(o))
                    {
                        GameObject.Destroy(o);
                    }
                }
                //add additional shape objects
                foreach (ShapeObject o in tempOut.shapes)
                {
                    if (!stagedOutputs[step].shapes.Contains(o))
                    {
                        stagedOutputs[step].shapes.Add(o);
                    }
                }
                //add additional names
                foreach (string n in tempOut.names)
                {
                    if (!stagedOutputs[step].names.Contains(n))
                    {
                        stagedOutputs[step].names.Add(n);
                    }
                }
            }
        }