예제 #1
0
파일: Client.cs 프로젝트: irsLu/SelfDevp
 static void InitForest(MapLayerComposite forest)
 {
     for (int i = 0; i < 10; i++)
     {
         MapNodeComponent tree  = new Tree("Tree" + i);
         MapNodeComponent grass = new Grass("Grass" + i);
         forest.Add(tree);
         forest.Add(grass);
     }
 }
예제 #2
0
파일: Client.cs 프로젝트: irsLu/SelfDevp
    static void Main(string[] args)
    {
        MapNodeComponent singleTree = new Tree("SingleTree");

        MapLayerComposite forest = new MapLayerComposite("Forest");

        InitForest(forest);

        singleTree.Draw();

        forest.Draw();

        Console.ReadKey();
    }