Skip to main content

SkillOrbEffect

A class in Root.Township, the global namespace.

Pooled visual of a skill orb dissolving: copies an orb's look, plays a shader progress animation, then returns to the pool. Client visuals.

Constructors​

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

Fields​

MemberWhat it is
protected AltaCoroutine destroyCoroutineThe running destroy animation.
11 private and internal fields
MemberWhat it is
private readonly int _MainTexShader ID of _MainTex.
private readonly int _ProgressShader ID of _Progress.
private Renderer centerRendererCentre renderer, hidden once the model is destroyed.
private float destroyModelAtProgressNormalized time at which the model and centre are hidden.
private float destroyTimeLength of the destroy animation in seconds.
private bool hasModelTrue when the slot has an icon to show.
private MaterialPropertyBlock internalModelBlockProperty block holding the slot icon texture.
private Material materialThis effect's own copy of the shell material.
private AnimationCurve materialProgressOverPooledNormalizedTimeCurve of shader progress over the animation's normalized time.
private Renderer modelRendererRenderer of the inner model showing the slot icon.
private Renderer targetRendererShell renderer whose material is animated.

Methods​

MemberWhat it is
override void Release()Clears the running coroutine and returns the effect to the pool.
override void ResetRun()Restarts the destroy animation.
void SetOriginalOrb(ISkillOrb orb)Copies the shell material and inner model transform from a real orb, then applies its slot.
void SetSlot(ProgressionSlot slot)Resets progress and shows the slot's icon on the inner model, or hides it if there is none.
protected virtual void Awake()Makes a private copy of the shell material and a property block for the inner model.
protected IEnumerator Destroy() (iterator)Coroutine that animates _Progress over destroyTime, hides the model partway, then releases the effect.
protected void StartRuning(PooledObject pooledObject)Stops any running destroy animation and starts a new one.