A class in Root.Township, ATT.Respawn.
Shows a respawn shrine's fuel: a frozen copy of the fuel item, the fuel amount, and hover and particle effects while players are subscribed. Driven by PoweredRespawnShrine.
Constructors
| Member | What it is |
|---|
RespawnShrineFuelDisplay() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private TextRenderer fuelAmount | Text that shows the fuel amount. |
private GameObject fuelConsumptionParticle | Particle object shown while fuel is being used. |
private Transform fuelDisplayTransform | Where the display copy of the fuel item is placed. |
private GameObject fuelItem | The spawned display copy of the fuel item. |
private HoverAnimator hoverAnimator | Hover animation played while fuel is being used. |
Methods
| Member | What it is |
|---|
void UpdateDisplay(PickupDockSettings dockSettings, float currentShrinePower, int subscriberCount) | Spawns the display item if needed and updates the amount text and consumption effects. |
5 private and internal methods
| Member | What it is |
|---|
private void DisableFuelItemComponents() | Makes the display copy of the fuel item non-interactable, non-networked, kinematic and without colliders. |
private void OnDisable() | Destroys the display copy of the fuel item. |
private void SpawnFuelItem(PickupDockSettings dockSettings) | Spawns a copy of the dock's first included item as the display item, once. |
private void UpdateFuelConsumptionVisuals(int subscriberCount) | Plays the hover animation and particles while the shrine has subscribers, and stops them otherwise. |
private void UpdateQuantity(float currentShrinePower) | Shows the fuel value rounded up as text. |
Used in
Members of other types that take, return or hold a RespawnShrineFuelDisplay: