Esempio n. 1
0
            public OverworldData(Overworld.MapData[,] map, string name)
            {
                int sizeX = map.GetLength(0);
                int sizeY = map.GetLength(1);
                Biomes = new int[sizeX, sizeY];
                Erosion = new float[sizeX, sizeY];
                Faults = new float[sizeX, sizeY];
                Rainfall = new float[sizeX, sizeY];
                Temperature = new float[sizeX, sizeY];
                Water = new int[sizeX, sizeY];
                Weathering = new float[sizeX, sizeY];
                Height = new float[sizeX, sizeY];
                Name = name;

                for(int x = 0; x < sizeX; x++)
                {
                    for(int y = 0; y < sizeY; y++)
                    {
                        Overworld.MapData data = map[x, y];
                        Biomes[x, y] =  (int)data.Biome;
                        Erosion[x, y] =  (data.Erosion);
                        Faults[x, y] = (data.Faults);
                        Height[x, y] = (data.Height);
                        Rainfall[x, y] =  (data.Rainfall);
                        Temperature[x, y] = (data.Temperature);
                        Water[x, y] = (int)(data.Water);
                        Weathering[x, y] =  (data.Weathering);
                    }
                }

                Screenshot = CreateTexture(PlayState.Game.GraphicsDevice, sizeX, sizeY);
            }