Exemple #1
0
 /// <summary>
 /// Make a new biome with the given potential features
 /// </summary>
 /// <param name="potentialFeatures"></param>
 protected Biome(int seed, IBiomeSettings settings = null, IFeatureType[] potentialFeatures = null)
 {
     Id                     = System.Threading.Interlocked.Increment(ref CurrentMaxBiomeID);
     this.seed              = seed;
     this.settings          = settings;
     this.potentialFeatures = potentialFeatures;
     noise                  = new FastNoise(seed);
 }
            /// <summary>
            /// Equality with other settings
            /// </summary>
            /// <param name="other"></param>
            /// <returns></returns>
            public bool Equals(IBiomeSettings other)
            {
                if (other is PlainSettings)
                {
                    PlainSettings otherPlainSettings = (PlainSettings)other;

                    return(maxHillHeightVariance == otherPlainSettings.maxHillHeightVariance &&
                           maxValleyDephVarriance == otherPlainSettings.maxValleyDephVarriance);
                }

                return(false);
            }