Skip to main content

EnvironmentalPropertyBlock

A class in Root.Township, the global namespace.

Holds the global wind direction and raises an event when it changes.

Constructors​

MemberWhat it is
EnvironmentalPropertyBlock()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private MaterialPropertyBlock propertyBlockMaterial property block, not used in this code.
private static Vector2 windDirectionBacking field for WindDirection.

Properties​

MemberWhat it is
static Vector2 WindDirection { get; set; }Global wind direction on the XZ plane; setting it raises WindChanged.

Events​

MemberWhat it is
static event Action WindChangedRaised whenever WindDirection is set.