Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var root = new Group{Name = "Root"};

            root.Children.Add(new Cube   { Name = "A"});
            root.Children.Add(new Sphere { Name = "B"});

            root.Render();

            Console.ReadKey();
        }
Ejemplo n.º 2
0
 public void Visit(Group group)
 {
     Console.WriteLine("The Group is here " + group.Name);
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var root = new Group{Name = "Root"};

            root.Children.Add(new Cube   { Name = "A"});
            root.Children.Add(new Sphere { Name = "B"});
            root.Children.Add(new SomeNewGo{ Name = "GO" });

            // root.Accept(new RenderingVisitor());
            new RenderingVisitor().Traverse(root);

            Console.ReadKey();
        }
Ejemplo n.º 4
0
 public virtual void Visit(Group group)
 {
 }