Skip to main content

AreaOfInfluenceReceiver

A class in Root.Township, the global namespace.

Trigger volume that checks the values of AreaOfInfluenceSender objects inside it and fires a bool event when any matches a correct value. A puzzle part; the correct values are saved.

Constructors​

MemberWhat it is
AreaOfInfluenceReceiver()Creates an AreaOfInfluenceReceiver with default values.

Fields​

4 private and internal fields
MemberWhat it is
private int[] correctIndexValues that count as correct. Saved and loaded through AreaOfInfluenceReceiverData.
private bool isCorrectResult of the last check.
private BoolUnityEvent onValueCheckEvent fired with the result after every check.
private List<LogicIntSender> sendersInColliderSenders currently inside the trigger.

Methods​

5 private and internal methods
MemberWhat it is
private void Awake()Runs the first check.
private void CheckIfCorrect()Sets isCorrect if any sender inside has a value in correctIndex, then fires onValueCheck.
private void OnTriggerEnter(Collider other)Adds an entering sender's LogicIntSender to the list and rechecks.
private void OnTriggerExit(Collider other)Removes a leaving sender and rechecks.
private void RemoveFromList(LogicIntSender sender)Removes a sender from sendersInCollider.