Skip to main content

SkillOrbScaler

A class in Root.Township, the global namespace.

Skill shrine visualizer that grows or shrinks the shrine's orbs by how close the shrine's player's hands are. Client side.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private AnimationCurve scaleOverDistanceOrb scale by distance in metres to the nearest hand.
private SkillShrine shrineThe shrine whose spawned orbs are scaled.
private Player targetPlayerThe player whose hands are measured.
private IUnityUpdateMethod updateHandle of the budgeted update.

Methods​

MemberWhat it is
override void Disable()Stops the scaling update.
override void PrepareOnServer(PlayerProgressionManager progressionManager)Empty.
override void Serialize(Stream stream, PlayerProgressionManager manager)Takes the player from the progression manager and starts the scaling update when reading.
2 private and internal methods
MemberWhat it is
private void OnDestroy()Stops the scaling update, except in headless builds.
private void UpdateHandPosition()Scales each free orb by scaleOverDistance from the nearest grip point; held or locked orbs stay at full size.