A static class in Root.Township, the global namespace.
Global darkness flag for the local client. Requests are batched to the next delayed call so only the final state per frame raises OnChanged; DarknessReader listens to it.
Fields
2 private and internal fields
| Member | What it is |
|---|
private static bool isDarkTarget | Last requested state. |
private static bool isUpdating | True while an update is queued. |
Properties
| Member | What it is |
|---|
static bool IsDark { get; private set; } | Whether the player is currently in a dark area. |
Events
| Member | What it is |
|---|
static event Action<bool> OnChanged | Raised with the new value when IsDark changes. |
Methods
| Member | What it is |
|---|
static void SetIsDark(bool isDark) | Requests a new darkness state, applied on a delayed call. |
1 private and internal method
| Member | What it is |
|---|
private static void UpdateDark() | Applies the requested state and raises OnChanged if it changed. |