示例#1
0
 public void Recycle(Effect effect)
 {
     if (effect != null)
     {
         EffectCached effectCached = null;
         if (cacheds.TryGetValue(effect.path, out effectCached))
         {
             effectCached.Recycle(effect, root.transform);
         }
     }
 }
示例#2
0
        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));
        }