예제 #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();
        }
예제 #2
0
 public void Visit(Group group)
 {
     Console.WriteLine("The Group is here " + group.Name);
 }
예제 #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();
        }
예제 #4
0
 public virtual void Visit(Group group)
 {
 }