CaveTeleporterPip
A class in Root.Township, Alta.Caves.
Client visual for one cave layer in the cave teleporter's level selector: shows whether the target layer is known and fuelled, and fades in when selected. Spawned by LevelSelector.
- Listed in World generation
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
CaveTeleporterPip() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private static readonly int _FillProgress | Shader property id for the fuel fill. |
private static readonly int _NegativeChangeProgress | Shader property id driven by whether the target layer is known. |
private Material animatingMaterial | This pip's own copy of the status material. |
private float animationDuration | Seconds a select fade takes (0.5 by default). |
private CaveTeleportConnection connection | The teleport connection this pip shows. |
private float currentProgress | Current select fade value, 0 to 1. |
private Coroutine fade | The running fade coroutine. |
private bool isSelected | Whether the pip is selected. |
private FloatEvent selectStrength | Event called with the fade value, to drive the selected look. |
private Renderer statusRenderer | Renderer whose material shows the pip's status. |
Methods
| Member | What it is |
|---|---|
void SetSelected(bool isSelected) | Selects or deselects the pip and starts the fade if the state changed. No fade on a headless server. |
void SetupConnection(CaveTeleportConnection connection) | Binds the pip to a teleport connection, moving its listeners off any old one, and shows the current state. |
4 private and internal methods
Used in
Members of other types that take, return or hold a CaveTeleporterPip: