public static void PlayUI(this ParticleLoader loader, Renderer r, int deltaRQ, Action <ParticleControl> loadCallback = null, Action <ParticleControl> endCallback = null) { if (loader == null) { return; } UIPanel p = loader.GetComponentInParent <UIPanel>(); if (p != null) { loader.Play(particle => { if (particle != null) { particle.SetRqDelta(r, deltaRQ); } else { Assert.IsNotNull(particle); } loadCallback.Call(particle); }, endCallback); } else { loader.Play(loadCallback, endCallback); } }
public static void PlayUI(this ParticleLoader loader, int deltaRQ, Action <ParticleControl> loadCallback = null, Action <ParticleControl> callback = null) { if (loader == null) { return; } loader.Play(particle => { loadCallback.Call(particle); particle.PlayUI(deltaRQ, callback); }, null); }