Ejemplo n.º 1
0
        public bool Remove(IAssetBundle item)
        {
            if (item == null)
            {
                return(false);
            }
            if (item == _resources)
            {
                _resources = null;
                return(true);
            }

            return(_bundles.Remove(item));
        }
Ejemplo n.º 2
0
 public void Add(IAssetBundle bundle)
 {
     if (bundle == null)
     {
         throw new System.ArgumentNullException("bundle");
     }
     if (bundle is AssetBundleGroup)
     {
         if (bundle == this || (bundle as AssetBundleGroup).ContainsDeep(this))
         {
             throw new System.ArgumentException("Bundle being added to group would result in a circular relationship.");
         }
     }
     else if (bundle is ResourcesAssetBundle)
     {
         _resources = bundle as ResourcesAssetBundle;
     }
     else
     {
         _bundles.Add(bundle);
     }
 }
Ejemplo n.º 3
0
 public void Clear()
 {
     _resources = null;
     _bundles.Clear();
 }