コード例 #1
0
 /// <summary>
 /// 清空.
 /// </summary>
 public override void Clear()
 {
     base.Clear();
     Path = null;
     Mode = BundleMode.None;
     IgnoreList.Clear();
 }
コード例 #2
0
 /// <summary>
 /// 清空.
 /// </summary>
 public override void Clear()
 {
     base.Clear();
     path = null;
     mode = BundleMode.None;
     ignoreList.Clear();
 }
コード例 #3
0
        /// <summary>
        /// 添加资源信息.
        /// </summary>
        /// <param name="iMode">打包模式.</param>
        /// <param name="iResourcePath">资源路径.</param>
        /// <param name="iIgnoreList">忽略列表.</param>
        public BundleResource AddResource(
            BundleMode iMode, string iResourcePath,
            List <string> iIgnoreList = null)
        {
            if (null == data)
            {
                return(null);
            }

            return(string.IsNullOrEmpty(iResourcePath) ? null :
                   data.AddResource(iMode, iResourcePath, iIgnoreList));
        }
コード例 #4
0
        /// <summary>
        /// 追加资源.
        /// </summary>
        /// <param name="iMode">打包模式.</param>
        /// <param name="iResourePath">资源路径.</param>
        /// <param name="iIgnoreList">忽略列表.</param>
        public BundleResource AddResource(
            BundleMode iMode,
            string iResourcePath,
            List <string> iIgnoreList)
        {
            if (true == string.IsNullOrEmpty(iResourcePath))
            {
                return(null);
            }

            BundleResource target = null;

            foreach (BundleResource loop in Resources)
            {
                if (false == iResourcePath.Equals(loop))
                {
                    continue;
                }
                target = loop;
                break;
            }

            // 不存在
            if (null == target)
            {
                target = new BundleResource();
                this.Resources.Add(target);
                target.Mode       = iMode;
                target.Path       = iResourcePath;
                target.IgnoreList = iIgnoreList;
            }
            else
            {
                target.Mode = iMode;
                if ((null != iIgnoreList) && (1 <= iIgnoreList.Count))
                {
                    foreach (string ignore in iIgnoreList)
                    {
                        target.AddIgnoreTarget(ignore);
                    }
                }
            }
            if (null == target)
            {
                this.Error("AddResource():Invalid target!!(Mode:{0} Path:{1})",
                           iMode, iResourcePath);
            }
            return(target);
        }
コード例 #5
0
        /// <summary>
        /// 添加资源信息.
        /// </summary>
        /// <param name="iMode">打包模式.</param>
        /// <param name="iResourePath">资源路径.</param>
        /// <param name="iIgnoreList">忽略列表.</param>
        public BundleResource AddResource(
            BundleMode iMode, string iResourcePath,
            List <string> iIgnoreList = null)
        {
            if (null == this.Data)
            {
                return(null);
            }

            if (true == string.IsNullOrEmpty(iResourcePath))
            {
                return(null);
            }
            return(this.Data.AddResource(iMode, iResourcePath, iIgnoreList));
        }
コード例 #6
0
        /// <summary>
        /// 追加资源.
        /// </summary>
        /// <param name="iMode">打包模式.</param>
        /// <param name="iResourcePath">资源路径</param>
        /// <param name="iIgnoreList">忽略列表.</param>
        public BundleResource AddResource(
            BundleMode iMode,
            string iResourcePath,
            List <string> iIgnoreList)
        {
            if (string.IsNullOrEmpty(iResourcePath))
            {
                return(null);
            }

            BundleResource target = null;

            foreach (var loop in resources)
            {
                if (false == iResourcePath.Equals(loop.path))
                {
                    continue;
                }
                target = loop;
                break;
            }

            // 不存在
            if (null == target)
            {
                target = new BundleResource();
                resources.Add(target);
                target.mode       = iMode;
                target.path       = iResourcePath;
                target.ignoreList = iIgnoreList;
            }
            else
            {
                target.mode = iMode;
                if (null == iIgnoreList || 1 > iIgnoreList.Count)
                {
                    return(target);
                }
                foreach (var ignore in iIgnoreList)
                {
                    target.AddIgnoreTarget(ignore);
                }
            }

            return(target);
        }
コード例 #7
0
 /// <summary>
 /// 初始化.
 /// </summary>
 public override void Init()
 {
     base.Init();
     mode = BundleMode.OneDir;
 }