public float GetArtificialLightExposure(bool force) { if (GetPlanter() != null) { return(GetPlanter().GetArtificialLightExposure()); } return(artificialLightExposure?.Get(force) ?? 0f); }
public float CalculateSunExposure(bool force) { if (TOD_Sky.Instance.IsNight) { return(0f); } if (GetPlanter() != null) { return(GetPlanter().GetSunExposure()); } return(sunExposure?.Get(force) ?? 0f); }
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); }