uiText
: Text |
The Unity Text object in which to display the results of the various tests this instance monitors.
BoolMonitor reflecting input state as well as specific controller information (battery percentage, position/orientation, etc.) are serialized to this text on a per-frame basis.
Signature
Text uiText |
BoolMonitor
(
name
, generator
, displayTimeout
)
|
Constructor for BoolMonitor.
Signature
BoolMonitor(string name, BoolGenerator generator, float displayTimeout=0.5f) Parameters name: string
The display name of the closure being monitored
generator: BoolGenerator
The closure to be monitored
displayTimeout: float
Optional parameter controlling how long after changing the display text for this monitor will remain emphasized
|
AppendToStringBuilder
(
sb
)
|
Serializes the current state of the monitor into a StringBuilder to be displayed.
This is a non-modifying function and does not actually update the current state; to update state, a separate call to Update must be made.
Signature
void AppendToStringBuilder(ref StringBuilder sb) Parameters sb: ref StringBuilder
The string builder to which the serialization should be appended
Returns void |
BoolGenerator
()
|
The closure type observed by by this BoolMonitor over time.
BoolMonitor(string, BoolGenerator, float) is typically invoked with an anonymous function as its second argument, which will be interpreted as this type.
Signature
delegate bool BoolGenerator() Returns delegate bool |
Update
()
|
Updates the BoolMonitor's state.
This invokes the BoolGenerator closure passed to this instance at construction, then updates the monitor's internal state based on whether and when the result of the closure changed.
Signature
void Update() Returns void |