Skip to main content

MouldCopyTest

A class in Root.Township, the global namespace.

Test component that applies a mould pattern item placed in a dock to a target Mould, once.

Constructors​

MemberWhat it is
MouldCopyTest()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

4 private and internal fields
MemberWhat it is
private PickupDock inputDockDock the pattern item goes in.
private bool isUsedTrue once the copy has happened.
private Mould mouldMould that receives the definition.
private GameObject usedDockObject shown while the copy is in progress.

Methods​

MemberWhat it is
void CheckMouldDock(PickupDock input, Mould targetMould)If the docked item has a MouldItemComponent, sets the target mould's definition from it and destroys one item.
2 private and internal methods
MemberWhat it is
private void Awake()Hooks the input dock's docked event.
private void HandleItemDocked(Interactor interactor, Pickup pickup, PickupDock dock)On the first dock, applies the pattern and unhooks itself.