public void Recycle(Effect effect) { if (effect != null) { EffectCached effectCached = null; if (cacheds.TryGetValue(effect.path, out effectCached)) { effectCached.Recycle(effect, root.transform); } } }
public Effect Take(string path, Transform parent) { EffectCached effectCached = null; if (!cacheds.TryGetValue(path, out effectCached)) { effectCached = new EffectCached(path); cacheds.Add(path, effectCached); } return(effectCached.Take(parent)); }