public void OpenGameVersion() { for (int index = 0; index < m_pack_list.Count; index++) { SqliteFilePack pack = m_pack_list[index]; pack.OpenGameVersion(); } Debug.Log("OpenGameVersion Succeed"); }
public bool RepalceInfoFromRemote(string pack_name, string file_name, string file_md5) { for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; if (pack != null && pack.m_pack_name == pack_name) { return(pack.RepalceInfoFromRemote(file_name, file_md5)); } } return(false); }
public void CloseGameDataBase(bool ignore_bundle) { for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; if (!pack.m_pack_name.Equals("unitybundle") || !ignore_bundle) { pack.CloseGameDataBase(); } } Debug.Log("CloseGameDataBase Succeed"); }
public bool RepalceInfoListFromRemote(string pack_name, List <string> file_list) { for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; bool flag = pack != null && pack.m_pack_name == pack_name; if (flag) { return(pack.RepalceInfoListFromRemote(file_list)); } } return(false); }
public int GetFileVersion(string file_name) { string pack_name = this.FindPackNameByFile(file_name); for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; if (pack.m_pack_name == pack_name) { return(pack.GetFileVersion(file_name)); } } return(0); }
public bool IsRemoteFile(string file_name) { string pack_name = this.FindPackNameByFile(file_name); for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; if (pack.m_pack_name == pack_name) { return(pack.ExistFile(file_name)); } } return(false); }
public bool FileNeedUpdate(string file_name, bool need_md5_check) { string pack_name = this.FindPackNameByFile(file_name); for (int index = 0; index < this.m_pack_list.Count; index++) { SqliteFilePack pack = this.m_pack_list[index]; bool flag = pack.m_pack_name == pack_name; if (flag) { return(pack.FileNeedUpdate(file_name, need_md5_check)); } } return(false); }
private IEnumerator CheckUpdateFileList(string pack_name, LuaFunction func, int frame_check_count) { int num; for (int index = 0; index < m_pack_list.Count; index = num) { SqliteFilePack pack = m_pack_list[index]; if (pack.m_pack_name == pack_name) { yield return(MonoHelper.StartCoroutine(pack.GetUpdateFileList(func, frame_check_count))); } pack = null; num = index + 1; } yield break; }
private void InitSqlite() { #region -初始化pack数据库 for (int index = 0; index < m_pack_name.Count; index++) { string pack_name = m_pack_name[index]; string db_file = GetVersionFile(pack_name, true); //patchs/xxx_main.sydb string remote_version_file = GetVersionFile(pack_name, false); //patchs/xxx_head.cymzq SqliteFilePack pack = new SqliteFilePack(m_http_path, db_file, remote_version_file, pack_name); if (pack_name == pack_names[1]) //luaconfig { pack.SetExtInfo(true, GameConfig.Instance["pack"], GameConfig.Instance["jyconfig"]); } else if (pack_name == pack_names[2])//unityres { switch (Application.platform) { case RuntimePlatform.OSXPlayer: case RuntimePlatform.IPhonePlayer: m_unity_assets_path = GameConfig.Instance["IosRespath"]; // /client/iosres/ break; case RuntimePlatform.WindowsPlayer: case RuntimePlatform.WindowsEditor: m_unity_assets_path = GameConfig.Instance["UnityResPath"]; // /client/unityres/ break; case RuntimePlatform.Android: m_unity_assets_path = GameConfig.Instance["AndroidResPath"]; // /client/androidres/ break; } pack.AddIgnoreStr(m_unity_assets_path);//只是为了去掉这个路径 pack.SetGameNoUpdateState(true); } else if (pack_name == pack_names[3])//unitybundle { switch (Application.platform) { case RuntimePlatform.IPhonePlayer: m_unity_bundle_path = GameConfig.Instance["IosBundle"]; break; case RuntimePlatform.WindowsEditor: m_unity_bundle_path = GameConfig.Instance["UnityBundle"]; break; case RuntimePlatform.Android: m_unity_bundle_path = GameConfig.Instance["AndroidBundle"]; break; } pack.AddIgnoreStr(this.m_unity_bundle_path); } m_pack_list.Add(pack); } #endregion m_cur_state = UpdateState.Init_Sqlite; m_loaded_count = 0; for (int i = 0; i < m_pack_list.Count; i++) { string pack_name = m_pack_list[i].GetPackName(); bool need_update = m_version_file_update[pack_name]; m_pack_list[i].InitSqlite(need_update); } }