A class in Root.Township, the global namespace.
An interactable that passes grabs on to another interactable, such as an extra handle on a larger pickup. It can refuse while the target is held, or held by the same player.
Constructors
| Member | What it is |
|---|
PickupExtension() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private PickupExtension.Allowance allowance | Rule for when to refuse: never, when the same player holds the target, or whenever the target is held. |
private Interactable targetInteractable | The interactable grabs are passed to. |
Methods
| Member | What it is |
|---|
override bool AssessInteraction(Interactor interactor, out float score) | Refuses the interaction when the allowance rule blocks it, otherwise scores it as usual. |
override Interactable CheckForward(Interactor interactor, out bool isForced) | Returns targetInteractable so the grab goes there, or null when the allowance rule blocks it. |
1 private and internal method
| Member | What it is |
|---|
private void SwapInteract(Interactor interactor, Interactable interactable) | Swaps the interactor over to targetInteractable. Not called in this class. |