LogicIntToBool
A class in Root.Township, Alta.Logic.
Turns an int logic input into a bool: true when the value is in a list of correct values, as used for combination puzzles. Saves the list.
- Listed in Items, inventory and logic
- Inherits or implements
MonoBehaviour,ISavable<LogicIntToBoolData>,ISavableSave<LogicIntToBoolData>,ISavableSaveBase - Derived types
LogicIntToBoolData - Documented in Other systems
Constructors
| Member | What it is |
|---|---|
LogicIntToBool() | Creates a LogicIntToBool with default values. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private int[] correctValues | Values that count as correct. |
private UnityEvent onCorrect | Unity event fired when the value is correct. |
private UnityEvent onIncorrect | Unity event fired when the value is not correct. |
private BoolUnityEvent onValueChanged | Unity event fired with whether the value is correct. |
private LogicIntReceiver receiver | Int receiver whose value is checked. |
Methods
| Member | What it is |
|---|---|
bool IntToBool(int i) | True when the value is one of correctValues. |
void ValueChanged() | Checks the receiver's current value and fires onValueChanged, then onCorrect or onIncorrect. |