A class in Root.Township, the global namespace.
Holds a child pickup (from a buildup slot) that the player can pull out with a PullPickup. When disposed, it lets the child go into the world or into the pulling hand.
Constructors
| Member | What it is |
|---|
DisposablePickupHolder() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private Pickup basePickup | The pickup the holder is part of; it must be held to pull. |
private Pickup heldPickup | The pickup being held. |
private PullPickup pullPickup | Pull handle that hands the held pickup over. |
private MethodSync syncHeld | Unused. |
Properties
1 private and internal property
| Member | What it is |
|---|
private bool IDisposablePickup.IsDisposed { get; } | Always false. |
Methods
| Member | What it is |
|---|
void Dispose(bool isForced) | Turns off the pull pickup and frees the held pickup into the pulling hand or the world, fixing its save mode. |
5 private and internal methods
| Member | What it is |
|---|
private void BaseFilter(Interactor interactor, Interactable interactable, ref bool result) | Only allows pulling by the player who is holding the base pickup. |
private void DestroyDispose(NetworkEntity entity, bool isUnload) | Disposes when the held pickup is destroyed by the scene (not unloaded). |
private void IGetChild.LoseChild(NetworkEntity child) | Empty. |
private void IGetChild.RegisterChild(NetworkEntity child) | Takes the child as the held pickup and points the pull pickup at it. |
private void Start() | Hooks the base filter and the held pickup's destroy, and turns the pull pickup on only if something is held. |