Skip to main content

ParticleSystemGroup

A class in Root.Township, the global namespace.

Component that scales emission rate and start size of all child particle systems together and works out the longest particle lifetime.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Dictionary<ParticleSystem, Vector2> systemsInitialSystemsEach child system's original emission rate (x) and start size (y).

Properties​

MemberWhat it is
float Duration { get; private set; }Longest start lifetime among the child particle systems, in seconds.

Methods​

MemberWhat it is
void UpdateMultiplier(float multiplier)Sets each child system's emission rate and start size to its original value times the multiplier.
2 private and internal methods
MemberWhat it is
private void Awake()Records each child system's starting emission rate and size, and sets Duration to the longest start lifetime.
private void OnDisable()Puts the multiplier back to 1.