//校验文件 void CheckFile() { m_InitView.SetTitle("校验文件"); string path = GameConfig.GetWWWReadPath("chinatown/filelist.txt"); ABLoader.Instance.LoadRes(path, (www) => { if (www.error != null) { InitFailed("获取校验列表失败"); return; } string text = www.text; FileListJson json = JsonUtility.FromJson <FileListJson>(text); StartCheckFile(json); }); }
//获得本地文件 public void GetLocalFileList() { m_InitView.SetTitle("获得本地文件列表"); string path = GameConfig.GetWWWReadPath("chinatown/filelist.txt"); ABLoader.Instance.LoadRes(path, (www) => { if (www.error != null) { InitFailed("获得本地文件列表失败"); return; } string text = www.text; m_LocalFileList = JsonUtility.FromJson <FileListJson>(text); GetServerFileList(); }); }
//获得本地版本 public void GetLocalVersion() { m_InitView.SetTitle("获得本地版本"); string path = GameConfig.GetWWWReadPath("chinatown/version.txt"); ABLoader.Instance.LoadRes(path, (www) => { if (www.error != null) { InitFailed("获得本地版本失败"); return; } m_LocalVersion = JsonUtility.FromJson <VersionJson>(www.text); m_InitView.SetVersion(m_LocalVersion.Version); GetServerVersion(); }); }