QuestCompleteEffect
A class in Root.Township, the global namespace.
Pooled popup shown when a quest task is done: shows the task text, scales up with a light, rises, then shrinks and returns to the pool. Client visual.
- Listed in Global namespace: Q to R
- Inherits or implements
PooledObject
Constructors
| Member | What it is |
|---|---|
QuestCompleteEffect() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private LightFader lightFader | Light turned on during the effect and off as it shrinks. |
private TransformEvent onScaleUpEnded | Event fired with the scaled transform when the scale-up ends. |
private float progress | Current animation progress. |
private float scaleAnimationDuration | Seconds the scale up and scale down each take. |
private FloatEvent scaleAnimationProgress | Event given the scale progress each frame. |
private Transform scalingTarget | Transform that is scaled. |
private TextRenderer text | Text renderer showing the task description. |
private float upAnimationDuration | Seconds the rise animation takes. |
private float upDuration | Total seconds from start of rise to start of shrink. |
private FloatEvent upProgress | Event given the rise progress each frame. |
Methods
| Member | What it is |
|---|---|
void SetupTask(string taskDescription) | Sets the text shown on the popup. |
3 private and internal methods
| Member | What it is |
|---|---|
private void Animate(PooledObject pooledObject) | Starts the animation coroutine when the object is taken from the pool. |
private IEnumerator Animation() (iterator) | Coroutine that scales up, plays the rise, waits, scales down and releases the object. |
private void Awake() | Hooks the pool's Requested event to start the animation. |