Skip to main content

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.

Constructors​

MemberWhat it is
LogicIntToBool()Creates a LogicIntToBool with default values.

Fields​

5 private and internal fields
MemberWhat it is
private int[] correctValuesValues that count as correct.
private UnityEvent onCorrectUnity event fired when the value is correct.
private UnityEvent onIncorrectUnity event fired when the value is not correct.
private BoolUnityEvent onValueChangedUnity event fired with whether the value is correct.
private LogicIntReceiver receiverInt receiver whose value is checked.

Methods​

MemberWhat 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.