using UnityEngine; using System.Collections; using System.Collections.Generic; namespace Gaia { public enum BorderMaskStyle {ImageMask, DistanceMask, None} /// /// Prototype for stamps and their fitness /// [System.Serializable] public class ResourceProtoStamp { /// /// The stamp directory name where stamps for this feature will be pulled from /// public string m_featureType; /// /// The influence setting for the stamp. /// public ImageMaskInfluence m_stampInfluence = ImageMaskInfluence.Global; /// /// The secondary mask used in the stamp to blend the stamp borders with the terrain. /// public BorderMaskStyle m_borderMaskStyle = BorderMaskStyle.DistanceMask; /// /// The directory name where stamps for the secondary image mask will be pulled from /// public string m_borderMaskType = "Masks"; /// /// The operation to perform for this stamp /// public GaiaConstants.TerrainGeneratorFeatureOperation m_operation = GaiaConstants.TerrainGeneratorFeatureOperation.MixHeight; /// /// only used internally to calculate the spawn chances during spawning /// public float m_stackedChance; /// /// The minimum width of the stamp /// public float m_minWidth = 50f; /// /// The maximum width of the stamp /// public float m_maxWidth = 200f; /// /// Whether the width should be tied to the strength of the spawn mask. If not, it will be rolled randomly. /// public bool m_tieWidthToStrength = true; /// /// The minimum height of the stamp /// public float m_minHeight = 1f; /// /// The maximum height of the stamp /// public float m_maxHeight = 5f; /// /// The minimum strength for a mix operation /// public float m_minMixStrength = 0.10f; /// /// The maximum strength for a mix operation /// public float m_maxMixStrength = 0.25f; /// /// The minimum mid point for a mix operation /// public float m_minMixMidPoint = 0.25f; /// /// The maximum mid point for a mix operation /// public float m_maxMixMidPoint = 0.75f; /// /// Whether the height should be tied to the strength of the spawn mask. If not, it will be rolled randomly. /// public bool m_tieHeightToStrength = true; /// /// The minimum height difference from the terrain surface of the stamp /// public float m_minYOffset = -1f; /// /// The maximum height difference from the terrain surface of the stamp /// public float m_maxYOffset = 1f; /// /// The chance that the stamp will be inverted /// public float m_invertChance = 0f; /// /// A mapping between the input height for the random terrain generation and the final stamp height that will be applied /// public AnimationCurve m_inputHeightToStampHeightMapping = ImageMask.NewAnimCurveStraightUpwards(); /// /// A mapping between the input height for the random terrain generation and the probability that this stamp will appear /// public AnimationCurve m_inputHeightToProbabilityMapping = ImageMask.NewAnimCurveStraightUpwards(); /// /// The overall spawn probability for this stamp /// public float m_spawnProbability; } }