Provides a noise module that outputs the value selected from one of two source modules chosen by the output value from a control module. [OPERATOR]
Наследование: ModuleBase
Пример #1
0
				public bool StartGame (double max, double min, int seed, int numberOfSites, 
		                       double ParsedContinentFrequency, double ParsedBiomeFrequency, int ParsedOctaves, double ParsedLacunarity, double ParsedPersistence)
				{
						Debug.Log ("Starting the game, Max is:" + max);
						Max = max;
						Min = min;
						Seed = seed;
						NumberOfSites = numberOfSites;
						baseContinentNoise = new Perlin (ParsedContinentFrequency, ParsedLacunarity, ParsedPersistence, ParsedOctaves, seed, LibNoise.Unity.QualityMode.Medium);
						baseContinentSubtractNoise = new Scale (3, 1, 3, baseContinentNoise);
						Subtract sub = new Subtract (baseContinentNoise, baseContinentSubtractNoise);
						perturbedContinentNoise = new Turbulence (1, sub);			


						mountainNoise = new RiggedMultifractal (ParsedBiomeFrequency, ParsedLacunarity, ParsedOctaves, seed, LibNoise.Unity.QualityMode.Medium);
						baseFlatTerrainNoise = new Billow (ParsedBiomeFrequency, ParsedLacunarity, ParsedPersistence, ParsedOctaves, seed, LibNoise.Unity.QualityMode.Medium);
						flatTerrainNoise = new ScaleBias (0.25, -0.75, baseFlatTerrainNoise);
						terrainTypeNoise = new Perlin (ParsedBiomeFrequency, ParsedLacunarity, ParsedPersistence, ParsedOctaves, seed, LibNoise.Unity.QualityMode.Low);
						finalTerrainNoise = new Select (flatTerrainNoise, mountainNoise, terrainTypeNoise);
						finalTerrainNoise.SetBounds (0, 1000);
						finalTerrainNoise.FallOff = .5;

						finalTerrainNoiseMinusContinentNoise = new Subtract(finalTerrainNoise,perturbedContinentNoise);

						heatNoise = new Perlin (ParsedBiomeFrequency, ParsedLacunarity, ParsedPersistence, ParsedOctaves, seed, LibNoise.Unity.QualityMode.Medium);
						moistureNoise = new Perlin (ParsedBiomeFrequency, ParsedLacunarity, ParsedPersistence, ParsedOctaves, -seed, LibNoise.Unity.QualityMode.Medium);

						return BuildGraph ();
				}