private static GetDirectParticleSystemChildrenRecursive ( |
||
transform | ||
particleSystems | List |
|
Результат | void |
private static void GetDirectParticleSystemChildrenRecursive(Transform transform, List <ParticleSystem> particleSystems) { IEnumerator enumerator = transform.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform transform2 = (Transform)enumerator.Current; ParticleSystem component = transform2.gameObject.GetComponent <ParticleSystem>(); if (component != null) { particleSystems.Add(component); ParticleEffectUI.GetDirectParticleSystemChildrenRecursive(transform2, particleSystems); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } }
internal static ParticleSystem[] GetParticleSystems(ParticleSystem root) { List <ParticleSystem> list = new List <ParticleSystem>(); list.Add(root); ParticleEffectUI.GetDirectParticleSystemChildrenRecursive(root.transform, list); return(list.ToArray()); }
private static void GetDirectParticleSystemChildrenRecursive(Transform transform, List <ParticleSystem> particleSystems) { foreach (Transform transform2 in transform) { ParticleSystem component = transform2.gameObject.GetComponent <ParticleSystem>(); if (component != null) { particleSystems.Add(component); ParticleEffectUI.GetDirectParticleSystemChildrenRecursive(transform2, particleSystems); } } }