Skip to main content

SenderInput

An abstract class in Root.Township, Alta.Logic.

Base for a receiver's link to one logic sender: holds the manager and lets the receiver subscribe to value changes. Serialized inside receiver components.

Constructors​

MemberWhat it is
protected SenderInput()Creates a SenderInput with default values.

Properties​

MemberWhat it is
GlobalLogicManager Manager { get; set; }The GlobalLogicManager this input's sender data lives in.

Methods​

MemberWhat it is
abstract bool AttemptLink(LogicValueSender sender)Links this input to the given sender if it is the right type and uses the same logic manager. Returns whether it linked.
abstract void Destroy()Removes this input's listener from the sender's data. Called from the receiver's OnDestroy.
abstract void DrawGizmos(Component receiver)Editor gizmo hook for showing the link from a receiver. Empty in the generic version.
abstract void Subscribe(Action listener, bool isCalling = true)Adds a listener for value changes and, if isCalling is true and data is linked, calls it once now.