Skip to main content

ConglomerateDestroyByTime

A class in Root.Township, the global namespace.

Pooled effect that merges with active copies nearby: it releases them and grows by a curve based on how many it absorbed.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private static List<ConglomerateDestroyByTime> activeEvery copy currently out of the pool.
private int currentCountHow many effects this one stands for, itself included.
private float nearbyRangeSquaredSquared distance within which copies merge.
private AnimationCurve scaleOnNearbyCurve from the number of merged copies to scale.

Methods​

MemberWhat it is
override void Release()Removes it from the active list and releases it.
protected override void Awake()Hooks the pool request to CheckNearby.
2 private and internal methods
MemberWhat it is
private void CheckNearby(PooledObject pooledObject)Releases active copies in range, adds their counts to its own, and sets its scale from scaleOnNearby.
private void OnDrawGizmosSelected()Draws the merge range as a sphere.