Esempio n. 1
0
        public static List <MemberInspectorTreeElement> GenerateInspectorTree(StratusGameObjectInformation target)
        {
            var tree = new StratusSerializedTree <MemberInspectorTreeElement, StratusComponentInformation.MemberReference>();

            tree.AddElements(target.members, 0);
            return(tree.elements);
            //TreeBuilder<MemberInspectorTreeElement, ComponentInformation.MemberReference> treeBuilder = new TreeBuilder<MemberInspectorTreeElement, ComponentInformation.MemberReference>();
            //treeBuilder.AddChildren(target.members, 0);
            //return treeBuilder.ToTree();
        }
        //------------------------------------------------------------------------/
        // Data
        //------------------------------------------------------------------------/
        private List <EventTreeElement> BuildEventTree()
        {
            this.events = StratusReflection.GetSubclass <Stratus.StratusEvent>();
            EventInformation[] eventsInformation = new EventInformation[this.events.Length];
            for (int i = 0; i < this.events.Length; ++i)
            {
                eventsInformation[i] = new EventInformation(this.events[i]);
            }

            //var treeBuilder = new TreeBuilder<EventTreeElement, EventInformation>();
            //treeBuilder.AddChildren(eventsInformation, 0);
            //return treeBuilder.ToTree();

            tree = new StratusSerializedTree <EventTreeElement, EventInformation>(eventsInformation);
            return(tree.elements);
        }