Skip to main content

DurabilityModule.DurabilityVisual

A class in Root.Township, the global namespace.

One damage stage of a DurabilityModule: the renderers to show and the integrity threshold the stage starts below.

Constructors​

MemberWhat it is
DurabilityVisual()Creates a DurabilityModule.DurabilityVisual with default values.

Fields​

2 private and internal fields
MemberWhat it is
private float thresholdBacking field for Threshold.
private Renderer[] visualRenderersRenderers shown while this stage is active.

Properties​

MemberWhat it is
Renderer FirstRenderer { get; }The stage's first renderer, used for the stage change effect mesh.
float Threshold { get; }Integrity (0 to 1) above which the module stays on an earlier stage; stages are walked in order.

Methods​

MemberWhat it is
void CleanMissing()Removes destroyed renderers from the list.
void SetEnable(DurabilityModule module, bool isEnabled)Client: turns the stage's renderers on or off. Does nothing on a headless server.
void UpdateRenderers(Renderer[] oldFirstRenderers, Renderer[] newFirstRenderers)Swaps old renderers in the stage list for new ones.

Used in​

Members of other types that take, return or hold a DurabilityVisual: