A class in Root.Township, the global namespace.
Passes an event on at most once per interval. Call Invoke as often as you like.
Constructors
| Member | What it is |
|---|
FrequencyLimiter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private AltaEvent invoked | Event fired when Invoke is allowed through. |
private float minimumInterval | Seconds before it can fire again. Default 10. |
private float nextInvoke | Time after which the next call will fire. |
Methods
| Member | What it is |
|---|
void Invoke() | Fires invoked unless it already fired within the last minimumInterval seconds. |