A class in Root.Township, Alta.UI.
Developer-only panel on a repair box with build and destroy buttons. It deletes itself unless the local player is a developer.
Constructors
| Member | What it is |
|---|
RepairBoxDevControlPanel() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private PhysicalButton buildButton | Button that sends the build command. |
private PhysicalButton destroyButton | Button that sends the destroy command. |
private TextRenderer messageText | Text on the panel, refreshed on start. |
private RepairBox repairBox | The repair box the commands go to. |
Methods
5 private and internal methods
| Member | What it is |
|---|
private void Awake() | Deletes the panel if there is no repair box or the local player is not a developer; otherwise hooks the buttons. |
private void FilterInteraction(Interactor interactor, Interactable interactable, ref bool result) | Only lets developers press the buttons. |
private void HandleBuildPressed(Interactable arg1, Interactor arg2) | Asks the server to build the repair box. |
private void HandleDestroyPressed(Interactable arg1, Interactor arg2) | Asks the server to destroy the repair box. |
private void OnDestroy() | Unhooks the buttons. |