GymnasiumTeleportPointPage
A class in Root.Township, ATT.FeatureTestGymnasium.
Client tablet panel in the feature test gymnasium that lists every non-default SpawnArea in pages and teleports the local player to the one picked.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
PanelComponent
Constructors
| Member | What it is |
|---|---|
GymnasiumTeleportPointPage() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private ButtonWithEvents backButton | Button that goes to the previous page. |
private int currentPage | Zero-based index of the page being shown. |
private Action despawnTablet | Action passed to Setup that removes the tablet after a teleport. |
private ButtonWithEvents forwardButton | Button that goes to the next page. |
private TeleportPointElement[] teleportListElements | The fixed list elements on the panel. Their count is the page size. |
private SpawnArea[] teleportPoints | All spawn areas found by Setup, sorted by identifier name. |
Properties
1 private and internal property
Methods
| Member | What it is |
|---|---|
void Setup(Action despawnTablet) | Finds all spawn areas except the default one, sorts them by identifier and shows the first page. Takes the action that despawns the tablet. |
11 private and internal methods
| Member | What it is |
|---|---|
private void ClearElement(TeleportPointElement view) | Clears and hides one list element and unhooks its selection handler. |
private void DisplayNoSpawnPoints() | Hides all list elements and both page buttons when there are no spawn areas. |
private bool HasNextPage() | True when there are more spawn areas after the current page. |
private void OnPageBackwards(Button obj) | Back button handler: shows the previous page. |
private void OnPageForward(Button obj) | Forward button handler: shows the next page. |
private void OnTeleportPointSelected(ListElementWithButton element) | Despawns the tablet and moves the local player to a random position in the chosen spawn area. |
private void ResetPanel() | Clears every list element. |
private void SetupElement(TeleportPointElement view, SpawnArea spawnPoint) | Fills one list element with a spawn area, hooks its selection handler and shows it. |
private void SetupNavigationButtons() | Shows and hooks the forward and back buttons only when there is a page in that direction. |
private void SetupTeleportPointElements() | Fills the list elements with the spawn areas for the current page. |
private void UpdatePageView(int page) | Switches to the given page and redraws the list and buttons. |
Used in
Members of other types that take, return or hold a GymnasiumTeleportPointPage: