Skip to content

Instantly share code, notes, and snippets.

@martindevans
Created November 26, 2020 15:30
Show Gist options
  • Save martindevans/e4ece47bddad555d37f20c00b4b8290e to your computer and use it in GitHub Desktop.
Save martindevans/e4ece47bddad555d37f20c00b4b8290e to your computer and use it in GitHub Desktop.
public class TenkokuWetness
: BaseExternalWetnessSource
{
[SerializeField, Range(-1, 1), Tooltip("Current change-per-second in environmental wetness")]
private float _editorRainIntensity;
public override float RainIntensity
{
get
{
#if UNITY_EDITOR
// If we're in edit mode then return the value from the inspector sliders
if (!UnityEditor.EditorApplication.isPlaying)
return _editorRainIntensity;
#endif
// TODO: Get current rain intensity from TENKOKU. The _rate_ that it is getting wetter.
// -1: Drying out as quickly as possible (hot sun).
// 0: no change.
// 1: maximum possible rain intensity (rain storm).
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment