A class in Root.Township, the global namespace.
Server only: empties a dock on start and again a set time after each item is docked. Removes itself on clients.
Constructors
| Member | What it is |
|---|
EmptyDockAfterTimePeriod() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Timeline.IEntry destroyDockedTimer | The pending Timeline entry that will empty the dock. |
private PickupDock dock | The dock to empty. |
private float resetTimeInMinutes | Minutes after docking before the dock is emptied (5 by default). |
Methods
4 private and internal methods
| Member | What it is |
|---|
private void DestroyItem() | Destroys everything stored in the dock. |
private void OnDestroy() | Unhooks the dock event and cancels the timer. |
private void Start() | Server: empties the dock and hooks ItemDocked. Client: destroys this component. |
private void StartDestroyTimer(Interactor interactor, Pickup pickup, PickupDock dock) | Starts a timer to empty the dock after resetTimeInMinutes. A new dock replaces the stored timer without cancelling the old one. |