Ejemplo n.º 1
0
        public static void DrawFields(BaseNode node, bool focus, bool active)
        {
            var fields = ReactTypeRegister.GetFields(node);

            foreach (var f in fields)
            {
                if (f.IsStatic)
                {
                    continue;
                }
                if (f.Name == "enabled")
                {
                    continue;
                }
                if (f.Name == "Reactor")
                {
                    continue;
                }
                if (focus)
                {
                    GUI.SetNextControlName("FirstFocus");
                }
                // if (active)
                DrawFieldEditor(f, node);
                // else
                // DrawFieldLabels(f, node);
            }
            if (node is SuperNode)
            {
                node.rect.height *= 2;
            }
        }
Ejemplo n.º 2
0
        void PreProcessGraph(Root root, BaseNode node)
        {
            if (node is Label)
            {
                labels.Add(((Label)node).id);
            }
            foreach (var fi in ReactTypeRegister.GetFields(node))
            {
            }
            var branch = node as BranchNode;

            if (branch != null)
            {
                foreach (var child in branch.Children)
                {
                    PreProcessGraph(root, child);
                }
            }
            var decorator = node as DecoratorNode;

            if (decorator != null && decorator.Child != null)
            {
                PreProcessGraph(root, decorator.Child);
            }
        }