private static int GetCountDepthBased(LocalPropSet propSet, Random randomStream, Tile tile) { float curveValue = Mathf.Clamp(propSet.CountDepthCurve.Evaluate(tile.Placement.NormalizedPathDepth), 0, 1); int count = Mathf.RoundToInt(Mathf.Lerp(propSet.PropCount.Min, propSet.PropCount.Max, curveValue)); return(count); }
private static int GetCountRandom(LocalPropSet propSet, Random randomStream, Tile tile) { int count = propSet.PropCount.GetRandom(randomStream); count = Mathf.Clamp(count, 0, propSet.Props.Weights.Count); return(count); }
private static int GetCountDepthMultiply(LocalPropSet propSet, Random randomStream, Tile tile) { float curveValue = Mathf.Clamp(propSet.CountDepthCurve.Evaluate(tile.Placement.NormalizedPathDepth), 0, 1); int count = GetCountRandom(propSet, randomStream, tile); count = Mathf.RoundToInt(count * curveValue); return(count); }