예제 #1
0
        /// <summary>
        /// Initialized the test terrain library.
        /// </summary>
        private void CreateTestLibrary()
        {
            testLibrary = new Library();
            Descriptor desc = new Descriptor();
            desc.Name = "Small Scale Landscape";
            desc.Description = "Terrain library suitable for small scale maps.";
            testLibrary.Descriptor = desc;

            Terrain t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Grasslands";
            desc.Description = "Grasslands or open plains";
            t.SurfaceColor = new ColorARGB("#ffb5cf7c");
            testLibrary.Add(t);

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Forest";
            desc.Description = "Forested area populated with mostly deciduous trees";
            t.SurfaceColor = new ColorARGB("#ff879959");
            testLibrary.Add(t);
            PngImage surfaceFeature = new PngImage(File.ReadAllBytes(@"Assets\set00-trn01-ftr01.png"));
            t.AddSurfaceFeature(new Terrain.SurfaceFeature(surfaceFeature));

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Dense Forest";
            desc.Description = "Dense, old growth forest with deciduous trees";
            t.SurfaceColor = new ColorARGB("#ff556332");
            testLibrary.Add(t);
            surfaceFeature = new PngImage(File.ReadAllBytes(@"Assets\DenseForest-001.png"));
            t.AddSurfaceFeature(new Terrain.SurfaceFeature(surfaceFeature));

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Mountains";
            desc.Description = "Mountains with little or, no vegitation.";
            t.SurfaceColor = new ColorARGB("#ffa67048");
            testLibrary.Add(t);

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Marsh";
            desc.Description = "Temperate climate marsh or moors.";
            t.SurfaceColor = new ColorARGB("#ff8bd4cb");
            testLibrary.Add(t);
            surfaceFeature = new PngImage(File.ReadAllBytes(@"Assets\set00-trn03-ftr01.png"));
            t.AddSurfaceFeature(new Terrain.SurfaceFeature(surfaceFeature));

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Desert";
            desc.Description = "Sandy desert with little or, no vegitation.";
            t.SurfaceColor = new ColorARGB("#ffd1c0a1");
            testLibrary.Add(t);

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Water";
            desc.Description = "Water. Typically shallow with a depth of less than 50 meters";
            t.SurfaceColor = new ColorARGB("#ff6ccdf1");
            testLibrary.Add(t);

            t = new Terrain();
            desc = new Descriptor();
            t.Descriptor = desc;
            desc.Name = "Deep Water";
            desc.Description = "Water, typically with a depth of more than 50 meters";
            t.SurfaceColor = new ColorARGB("#ff308aab");
            testLibrary.Add(t);
        }
예제 #2
0
 public Terrain()
     : base()
 {
     Descriptor = new Descriptor();
     _featureList = new List<SurfaceFeature>();
 }