예제 #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
 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);
 }