Skip to main content

SkillOrbConnectionline

A class in Root.Township, the global namespace.

Line drawn between two skill orbs (or an orb and the shrine's ray origin) on a SkillShrine, coloured by the orb's buy status. Client visuals, made by the shrine.

Constructors​

MemberWhat it is
SkillOrbConnectionline(uint entityFromIdentifier, uint entityToIdentifier, SkillShrine shrine)Creates a SkillOrbConnectionline from entityFromIdentifier, entityToIdentifier and shrine.

Fields​

11 private and internal fields
MemberWhat it is
private readonly int _TintColorShader id of _TintColor.
private uint entityFromIdentifierEntity id of the orb the line starts at.
private uint entityToIdentifierEntity id of the orb the line ends at, or 0 to end at the shrine's ray origin.
private Transform fromTransform of the start orb, once found.
private LineRenderer lineThe LineRenderer on the pooled line.
private Vector3 midPointPoint the line shrinks to when destroyed.
private PooledObject pooledLinePooled line object from the shrine's line definition.
private Vector3[] positionsThe two line end points.
private SkillShrine shrineThe shrine this line belongs to.
private Transform toTransform of the end orb or the shrine's ray origin.
private IUnityUpdateMethod updateMethodHandle for whichever budgeted update is running (wait, update or shrink).

Methods​

MemberWhat it is
void Destroy()Starts shrinking the line toward its midpoint before it is released.
void DestroyUpdate()Per-frame shrink toward the midpoint; releases the pooled line when it gets there or the shrine is gone.
void Update()Keeps the line's ends on the two orbs. Starts Destroy if either is gone.
2 private and internal methods
MemberWhat it is
private void UpdateColor(SkillOrb orb, SkillStatus status)Sets the line tint from the orb's status. Orbs with no dependencies show as allowed instead of can't buy.
private void WaitToSpawn()Waits until both entities exist, then takes a pooled line, hooks the orb's status event and starts Update.

Used in​

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