コード例 #1
0
ファイル: NodeGameObject.cs プロジェクト: timoffex/Birdkeeper
        public NodeGameObject(GameObject gameObject, ObjectGraph graph)
        {
            graph.AddNode(this);
            representedObject = gameObject;


            components = new List <ObjectComponent> ();


            name = gameObject.name;
            foreach (Component component in gameObject.GetComponents(typeof(Component)))
            {
                components.Add(new ObjectComponent(component, graph));
            }
        }
コード例 #2
0
        public NodeClass(object obj, ObjectGraph graph)
        {
            graph.AddNode(this);
            representedObject = obj;

            Type type = obj.GetType();

            parameters = new List <Parameter> ();

            foreach (FieldInfo field in type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
            {
                Parameter param = new Parameter();
                param.field = field;
                param.value = NodeFactory.CreateNodeFor(field.GetValue(obj), graph);

                parameters.Add(param);
            }
        }
コード例 #3
0
ファイル: NodePrimitive.cs プロジェクト: timoffex/Birdkeeper
 public NodePrimitive(object val, ObjectGraph graph)
 {
     graph.AddNode(this);
     representedObject = val;
     value             = val;
 }