Skip to main content

PracticeAreaShrinkFader

An abstract class in Root.Township, the global namespace.

Base class for a skill shrine practice area object that fades in from the testing orb's position. Objects that don't use the fade material turn on near the end.

Constructors​

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

Fields​

MemberWhat it is
protected SkillShrineTestingArea testingAreaThe testing area this object belongs to.
3 private and internal fields
MemberWhat it is
private readonly int _ShrinkPointShader property id for the point the effect shrinks to.
private List<GameObject> nonAnimatedObjectsObjects that can't use the fade shader, so they're just turned on.
private float toggleEnableTargetProgress value below which the other objects turn on.

Methods​

MemberWhat it is
override void PostBake()Removes destroyed objects from nonAnimatedObjects.
virtual void RegisterTestingArea(SkillShrineTestingArea testingArea)Links the testing area, sets the shrink point and starts the fade once the orb is in place.
protected virtual void Awake()Client: hides the objects that don't animate.
protected override IEnumerator Fade() (iterator)Coroutine that runs the shader progress from 1 to 0 and turns the other objects on below toggleEnableTarget.
protected override void OnValidate()If the list is empty, fills nonAnimatedObjects with children whose renderer doesn't use the base material.
protected void ToggleRenderersEnabled(bool isEnabled)Turns all nonAnimatedObjects on or off.

Used in​

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