A class in Root.Township, Alta.Logic.
Logic receiver that outputs true while an int input is within an inclusive range (or outside it, if set). Runs on the server and saves its range.
Constructors
| Member | What it is |
|---|
LogicIntRangeReceiver() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private bool currentValue | Last output value. |
private bool isActiveWithinRange | True to output true inside the range, false to output true outside it. |
private int maximumValueInclusive | Upper bound, included. |
private int minimumValueInclusive | Lower bound, included. |
private BoolUnityEvent onValueUpdated | Unity event fired with the new output. |
Methods
| Member | What it is |
|---|
override void InitializeAsServer(SpawnData spawnData) | Server: works out the starting value and fires onValueUpdated with it. |
protected override void ValueUpdated() | When the input changes, fires onValueUpdated if the result changed. |
1 private and internal method
| Member | What it is |
|---|
private bool GetValue() | Checks whether the input is within the inclusive bounds, inverted if isActiveWithinRange is off. |