protected override Color[] GenerateTextureColors() { _heighmapGen.GenerateDiamondSquareHeighmap(); _heighmapGen.Sqr(); _snowEdge = YSize / 6; _greenEdge = YSize / 2; GenerateBiomes(); var colors = new Color[YSize * XSize]; Int32 counter = 0; for (Int32 y = 0; y < YSize; y++) { for (Int32 x = 0; x < XSize; x++) { Single height = _heighmapGen.Heighmap[x, y]; if (height < WaterLevel) { colors[counter] = OceanColor(height); } else { if (Curves.CheckInRange(y + Random.Range(-10, 10), _southGreen[x], _northGreen[x])) { colors[counter] = DesertColor(height); if (height < WaterLevel + 0.1f + Random.Range(-0.1f, 0.1f)) { colors[counter] = GreenColor(height); } } else { colors[counter] = GreenColor(height); } if (height > 0.82f + Random.Range(-0.05f, 0.05f)) { colors[counter] = MountainsColor(height); } } if (y < _southSnow[x] + Random.Range(-10, 10) || y > _northSnow[x] + Random.Range(-10, 10)) { colors[counter] = SnowColor(height); } counter++; } } return(colors); }