A class in Root.Township, the global namespace.
Main-menu orb the player grabs and lets go of to act on the selected server in the server list. It can't be picked up while no server is selected.
Constructors
| Member | What it is |
|---|
ServerSelectionOrb() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private ActionOrb actionOrb | The ActionOrb the player grabs. |
private ServerElement selectedElement | The server currently selected in the list. |
private Transform selectionOrbPosition | Where the orb sits when not held. |
private ServerElementEvent validOrbLetGo | Event fired with the selected server on a valid let-go. |
Methods
| Member | What it is |
|---|
void UpdateSelectionOrbBasedOnSelection(ServerElement newElement) | Stores the new selection. If it's null, force-drops the orb. |
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the orb's pickup filter and valid let-go event, and sets its home position. |
private void EnsureServerIsSelected(Interactor interactor, Interactable interactable, ref bool result) | Pickup filter that blocks grabbing the orb while no server is selected. |
private void LetGo() | Fires validOrbLetGo with the selected server when the orb is let go in a valid place. |