ClimbingTowerProgressionVisualizer
A class in Root.Township, Features.Gameplay.ClimbingTower.
Climbing tower gauge and rune display. On clients it lights the rune for the highest orb the local player has and sets the gauge marker to that rune's height. The rune settings are saved.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
NetworkEntityBehaviour,IBuildRendererPostBake,IBuildBakeable,ISavable<ClimbingTowerProgressionVisualizerSaveData>,ISavableSave<ClimbingTowerProgressionVisualizerSaveData>,ISavableSaveBase - Derived types
ClimbingTowerProgressionVisualizerSaveData - Nested types
RuneActivationElement
Constructors
| Member | What it is |
|---|---|
ClimbingTowerProgressionVisualizer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private static readonly int _FillProgress | Shader property ID for the gauge fill. |
private static readonly int _FurthestPoint | Shader property ID for the gauge's furthest point marker. |
private Material instantiatedMaterial | Backing field for InstantiatedMaterial. |
private static readonly Logger logger | NLog logger for this class. |
private const int MaximumVisualizerGaugeValue | Upper clamp for the gauge height value, 3. |
private List<ClimbingTowerProgressionVisualizer.RuneActivationElement> runeActivationElements | Runes, each with its particle object, the orb index that lights it and its gauge height. |
private MethodSyncClass<List<ClimbingTowerProgressionVisualizer.RuneActivationElement>> syncRuneActivationElements | Method sync for the rune settings. |
private Renderer[] teleporterGauges | Gauge renderers that share the instanced material. |
Properties
1 private and internal property
Methods
| Member | What it is |
|---|---|
override void Initialize() | Creates the syncRuneActivationElements method sync on SyncC. |
void Load(ClimbingTowerProgressionVisualizerSaveData data, ISerializeChildren childSerializer) | Restores each rune's orb index and gauge height from save data, keeping the scene's particle objects. |
ClimbingTowerProgressionVisualizerSaveData Save(ISerializeChildren childSerializer) | Saves each rune's orb index and gauge height. |
void SetGaugeMaterialProgression(float progress) | Sets the gauge fill (_FillProgress) to a value clamped from 0 to 1. |
11 private and internal methods
| Member | What it is |
|---|---|
private void OnDestroy() | Unhooks player events and destroys the instanced material. |
private void OnDisable() | Unhooks the unlock manager's Modified event. |
private void OnEnable() | Client: sets up for the local player now, or waits for Player.LocalPlayerSet. |
private void IBuildRendererPostBake.PostBake() | Build step that removes missing renderers from teleporterGauges. |
private void RemoveRuneUpdateFromModificationEvent() | Unhooks UpdateActiveTeleporterRunes from the local player's unlock manager. |
private void SetHeightPointOnGauge(float heightPoint) | Sets the gauge's furthest point (_FurthestPoint), clamped from 0 to 3. |
private void SetTeleporterRuneAsActive(ClimbingTowerProgressionVisualizer.RuneActivationElement activationElement) | Turns on the rune's particles and moves the gauge marker to its height. |
private void SetTeleporterRuneAsInactive(ClimbingTowerProgressionVisualizer.RuneActivationElement activationElement) | Turns off the rune's particles. |
private void Setup(IPlayer player) | Hooks the local player's unlock manager Modified event and refreshes the runes. |
private void SyncRuneActivationElements(IPlayer player, Stream stream, List<ClimbingTowerProgressionVisualizer.RuneActivationElement> runeActivationElementsToSync) | Writes or reads each rune's orb index and gauge height; remote clients then refresh the runes. Nothing in this class sends it. |
private void UpdateActiveTeleporterRunes() | Client: lights only the last rune whose orb the local player has, and turns the others off. |