示例#1
0
 private void Update()
 {
     if (LocalPlayer.Transform)
     {
         float num = this.CalcCellLodRatio(this.WorldToGridX(LocalPlayer.Transform.position.x), this.WorldToGridY(LocalPlayer.Transform.position.z));
         this.TreeDensityUnscaled = 1f - (num - this._minOutput) / this._maxOutput;
         if (this._updateTreeOcclusionBonusRatio)
         {
             TheForestQualitySettings.DrawDistances drawDistance = TheForestQualitySettings.UserSettings.DrawDistance;
             if (drawDistance != TheForestQualitySettings.DrawDistances.Medium)
             {
                 if (drawDistance != TheForestQualitySettings.DrawDistances.Low)
                 {
                     if (drawDistance == TheForestQualitySettings.DrawDistances.UltraLow)
                     {
                         num -= (num - this._minOutput) * 0.6f;
                     }
                 }
                 else
                 {
                     num -= (num - this._minOutput) * 0.4f;
                 }
             }
             else
             {
                 num -= (num - this._minOutput) * 0.2f;
             }
             LOD_Manager.TreeOcclusionBonusRatio = Mathf.Lerp(LOD_Manager.TreeOcclusionBonusRatio, num, (LOD_Manager.TreeOcclusionBonusRatio >= num) ? 0.03f : 0.012f);
         }
     }
     else
     {
         LOD_Manager.TreeOcclusionBonusRatio = 1f;
     }
 }
示例#2
0
 private void Awake()
 {
     this.maxDrawDistanceSetting = this.LodSettings.GetNewObjectMaxDrawDistance;
 }
示例#3
0
	private void Awake()
	{
		this.maxDrawDistanceSetting = this.LodSettings.GetNewObjectMaxDrawDistance;
	}