Skip to main content

PlaceItemPuzzleLogic

A class in Root.Township, the global namespace.

Puzzle logic on a dock: when an item is docked or undocked it sends an output value and a valid flag based on which item is in the dock. The config is saved with the object.

Constructors​

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

Fields​

MemberWhat it is
PickupDock dockThe dock the puzzle watches.
3 private and internal fields
MemberWhat it is
private PlaceItemPuzzleLogicSaveData configThe options and output values, loaded from and saved to the save data.
private BoolUnityEvent onValidItemChangedUnity event sent true when a matching item is docked, false otherwise.
private IntUnityEvent onValueChangedUnity event sent the output value after each check.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Hooks CheckIfCorrect to the dock's docked and undocked events.
private void CheckIfCorrect(Interactor interactor, Pickup pickup, PickupDock dock)Finds the option that holds the docked item type and sends its output, or the invalid or empty value.

Used in​

Members of other types that take, return or hold a PlaceItemPuzzleLogic: