public ResourceRequireData(
			string path , bool autosave , long utime , bool autoClear ,
			RESOURCE_TYPE type, ENCRYPT_TYPE encrypt_type, DecryptBytesFunc decryptFunc
			)
        {
            this.m_strFilePath = path;
            this.m_cPathUri = new Uri(path);
            this.m_lUTime = utime;
            this.m_bAutoSave = autosave;
            this.m_bAutoClear = autoClear;
            this.m_eResType = type;
            this.m_eEncryType = encrypt_type;
            this.m_funDecryptFunc = decryptFunc;
            this.m_fLastUseTime = Time.fixedTime;
        }
 public ResourceRequireData(
     string path, bool autosave, long utime, bool autoClear,
     RESOURCE_TYPE type, ENCRYPT_TYPE encrypt_type, DecryptBytesFunc decryptFunc
     )
 {
     this.m_strFilePath    = path;
     this.m_cPathUri       = new Uri(path);
     this.m_lUTime         = utime;
     this.m_bAutoSave      = autosave;
     this.m_bAutoClear     = autoClear;
     this.m_eResType       = type;
     this.m_eEncryType     = encrypt_type;
     this.m_funDecryptFunc = decryptFunc;
     this.m_fLastUseTime   = Time.fixedTime;
 }
 /// <summary>
 /// 开始WW加载
 /// </summary>
 /// <param name="path"></param>
 /// <param name="crc"></param>
 /// <param name="version"></param>
 /// <param name="callback"></param>
 /// <param name="res_type"></param>
 /// <param name="encrypt_type"></param>
 /// <param name="decryptFunc"></param> 
 public static LoadPackage StartWWW(
     string path ,
     bool autosave = false , long utime = 0 , DOWN_FINISH_CALLBACK callback = null,
     DOWN_ERROR_CALLBACK error_call = null,
     RESOURCE_TYPE res_type = RESOURCE_TYPE.WEB_ASSETBUNLDE,
     ENCRYPT_TYPE encrypt_type = ENCRYPT_TYPE.NORMAL,
     DecryptBytesFunc decryptFunc = null
     )
 {
     GameObject obj = new GameObject("WWWLoad");
     LoadPackage loader = obj.AddComponent<LoadPackage>();
     loader.Init(
         path , autosave ,utime , callback,error_call,
         res_type, encrypt_type, decryptFunc);
     loader.StartCoroutine("Load");
     return loader;
 }
示例#4
0
        private bool m_bAutoSave;                     //auto save function.

        /// <summary>
        /// 开始WW加载
        /// </summary>
        /// <param name="path"></param>
        /// <param name="crc"></param>
        /// <param name="version"></param>
        /// <param name="callback"></param>
        /// <param name="res_type"></param>
        /// <param name="encrypt_type"></param>
        /// <param name="decryptFunc"></param>
        public static LoadPackage StartWWW(
            string path,
            bool autosave = false, long utime = 0, DOWN_FINISH_CALLBACK callback = null,
            DOWN_ERROR_CALLBACK error_call = null,
            RESOURCE_TYPE res_type         = RESOURCE_TYPE.WEB_ASSETBUNLDE,
            ENCRYPT_TYPE encrypt_type      = ENCRYPT_TYPE.NORMAL,
            DecryptBytesFunc decryptFunc   = null
            )
        {
            GameObject  obj    = new GameObject("WWWLoad");
            LoadPackage loader = obj.AddComponent <LoadPackage>();

            loader.Init(
                path, autosave, utime, callback, error_call,
                res_type, encrypt_type, decryptFunc);
            loader.StartCoroutine("Load");
            return(loader);
        }
示例#5
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// <param name="id"></param>
 private void Init(
     string path,
     bool autosave = false, long utime = 0,
     DOWN_FINISH_CALLBACK callback  = null,
     DOWN_ERROR_CALLBACK error_call = null,
     RESOURCE_TYPE res_type         = RESOURCE_TYPE.WEB_ASSETBUNLDE,
     ENCRYPT_TYPE encrypt_type      = ENCRYPT_TYPE.NORMAL,
     DecryptBytesFunc decryptFunc   = null
     )
 {
     this.m_strPath        = path;
     this.m_lUTime         = utime;
     this.m_bComplete      = false;
     this.m_cWww           = null;
     this.m_cCallBack      = callback;
     this.m_cErrorCallBack = error_call;
     this.m_delDecryptFunc = decryptFunc;
     this.m_eEncryptType   = encrypt_type;
     this.m_eResType       = res_type;
     this.m_fProgess       = 0;
     this.m_bAutoSave      = autosave;
 }
示例#6
0
 /// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     m_delDecryptFunc = CEncrypt.DecryptBytes;
 }
 /// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     m_delDecryptFunc = CEncrypt.DecryptBytes;
 }
 /// <summary>
 /// 初始化
 /// </summary>
 /// <param name="id"></param>
 private void Init(
     string path ,
     bool autosave = false, long utime = 0,
     DOWN_FINISH_CALLBACK callback = null,
     DOWN_ERROR_CALLBACK error_call = null,
     RESOURCE_TYPE res_type = RESOURCE_TYPE.WEB_ASSETBUNLDE,
     ENCRYPT_TYPE encrypt_type = ENCRYPT_TYPE.NORMAL,
     DecryptBytesFunc decryptFunc = null
     )
 {
     this.m_strPath = path;
     this.m_lUTime = utime;
     this.m_bComplete = false;
     this.m_cWww = null;
     this.m_cCallBack = callback;
     this.m_cErrorCallBack = error_call;
     this.m_delDecryptFunc = decryptFunc;
     this.m_eEncryptType = encrypt_type;
     this.m_eResType = res_type;
     this.m_fProgess = 0;
     this.m_bAutoSave = autosave;
 }