A class in Root.Township, Alta.Impact.
A BreakOnImpact for pickups that flags the first 0.1 seconds after a grab. In this build nothing reads the flag, so it behaves like plain BreakOnImpact.
Constructors
| Member | What it is |
|---|
PickupBreakOnImpact() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private bool isRecentGrab | True for 0.1 seconds after a grab. Not read anywhere in this build. |
private Pickup pickup | The pickup on the same object. |
private Coroutine timedDisableCoroutine | The running TimedBreakDisable coroutine, if any. |
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks DisableBreak into the pickup's InteractionStarted. |
private void DisableBreak(Interactable arg1, Interactor arg2) | On grab, restarts the short TimedBreakDisable coroutine. |
private IEnumerator TimedBreakDisable() (iterator) | Sets isRecentGrab for 0.1 seconds, then clears it. |