コード例 #1
0
        private void TestButton_Click(object sender, EventArgs e)
        {
            mapLoaded = true;
            InformationDisplay.Text = "";

            map.GenerateRegions();
            map.GenerateLandmass();
            map.CleanLandmass();
            map.AssignContinent();
            map.GenerateTemperature();
            map.GenerateHumidity();
            map.PlaceWinds();
            map.PlaceWaterCurrents();
            map.ApplyMapChange();
            // We apply winds and water current BEFORE generating rivers for the incoming erosion can alter potential river starting points
            map.PlaceRivers();
            map.ApplyMapChange();
            map.GenerateDeposit();
            map.FlowingRiver();
            map.UpdateGeology();


            map.DrawRegionMap();
            map.DrawHeightMap();
            map.DrawClimateMap();
            map.DrawTemperatureMap();
            map.DrawHumidityMap();
            map.DrawRiverMap();
            map.DrawWindMap();
            map.DrawWaterCurrentMap();

            map.DrawMountainMap();
            map.DrawLandmassMap();
            map.DrawContinentMap();

            InformationDisplay.Text += "Done !";

            using (var bmpTemp = new Bitmap(Program.filePath + "mapHeight.png"))
            {
                img = new Bitmap(bmpTemp);
                pictureBox1.Image = img;
            }
        }