Skip to main content

RandomInterval

A class in Root.Township, the global namespace.

Fires an event over and over at random intervals while the object is enabled.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private float maximumIntervalLongest wait in seconds.
private float minimumIntervalShortest wait in seconds.
private AltaEvent triggeredEvent fired each interval.

Methods​

2 private and internal methods
MemberWhat it is
private void OnEnable()Starts the trigger loop.
private IEnumerator Trigger() (iterator)Coroutine that waits a random time between the bounds and fires triggered, forever.