コード例 #1
0
 public float GetArtificialLightExposure(bool force)
 {
     if (GetPlanter() != null)
     {
         return(GetPlanter().GetArtificialLightExposure());
     }
     return(artificialLightExposure?.Get(force) ?? 0f);
 }
コード例 #2
0
 public float CalculateSunExposure(bool force)
 {
     if (TOD_Sky.Instance.IsNight)
     {
         return(0f);
     }
     if (GetPlanter() != null)
     {
         return(GetPlanter().GetSunExposure());
     }
     return(sunExposure?.Get(force) ?? 0f);
 }
コード例 #3
0
ファイル: Kayak.cs プロジェクト: Ailtop/RustDocuments
 protected override void VehicleFixedUpdate()
 {
     base.VehicleFixedUpdate();
     if (fixedDragUpdate == null)
     {
         fixedDragUpdate = new TimeCachedValue <float>
         {
             refreshCooldown    = 0.5f,
             refreshRandomRange = 0.2f,
             updateValue        = CalculateDesiredDrag
         };
     }
     rigidBody.drag = fixedDragUpdate.Get(false);
 }