Skip to main content

StatBarNotch

A class in Root.Township, Alta.StatSystem.

One notch mark on a curved stat bar. The bar places it along the curve and sets it to a minor or major size.

Constructors​

MemberWhat it is
StatBarNotch()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private Vector3 axisToRotateAroundLocal axis the notch rotates around to sit along the curve.
private Vector3 baseScaleScale applied before the major or minor height is set.
private float majorScaleY scale for major notches. Defaults to 0.5.
private float minorScaleY scale for minor notches. Defaults to 0.1.
private Renderer rendererBacking field for Renderer.

Properties​

MemberWhat it is
float Position { get; private set; }Normalized position along the bar's curve, set by SetPosition.
Renderer Renderer { get; }The notch's renderer.

Methods​

MemberWhat it is
void SetMaterial(Material material)Sets the renderer's shared material.
void SetPosition(float positionAlongCurve, float sizeOfStatBar, bool isMajor)Rotates the notch to its place along a bar of the given angular size and scales it as major or minor.

Used in​

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