From f496b583fc9d30aa6ff72c1b937df474ce9b48a4 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Fri, 27 May 2022 21:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 整理代码 --- Assets/TEngine/Runtime/Core/GameConfig.cs | 25 ---------- .../TEngine/Runtime/FileSystem/FileSystem.cs | 49 +++++++++---------- 2 files changed, 24 insertions(+), 50 deletions(-) diff --git a/Assets/TEngine/Runtime/Core/GameConfig.cs b/Assets/TEngine/Runtime/Core/GameConfig.cs index e5c35582..86af97ed 100644 --- a/Assets/TEngine/Runtime/Core/GameConfig.cs +++ b/Assets/TEngine/Runtime/Core/GameConfig.cs @@ -18,7 +18,6 @@ namespace TEngine { private static GameConfig _instance; public const string CONFIG = "version.json"; - public const string RESTALLCONFIG = "restall.txt"; public const string SUFFIX = "_Version"; private VersonConfig _versionConfig; private Dictionary _fileFixList = new Dictionary(); @@ -162,30 +161,6 @@ namespace TEngine return $"{AppId}.{ResId}"; } } - /// - /// 是否重新安装 - /// - /// - internal bool IsReinstall() - { - return File.Exists($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}"); - } - - /// - /// 设置重新安装了 - /// - internal void SignReInstall() - { - ReInstallFinish(); - File.Create($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}"); - } - /// - /// 去掉重新安装标志文件 - /// - internal void ReInstallFinish() - { - DeleteFile($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}"); - } /// /// 删除文件 diff --git a/Assets/TEngine/Runtime/FileSystem/FileSystem.cs b/Assets/TEngine/Runtime/FileSystem/FileSystem.cs index dc78b493..8dfcd092 100644 --- a/Assets/TEngine/Runtime/FileSystem/FileSystem.cs +++ b/Assets/TEngine/Runtime/FileSystem/FileSystem.cs @@ -6,6 +6,30 @@ using UnityEngine.Networking; namespace TEngine { + [Serializable] + public struct fileMd5 + { + public string fileName; + public string md5; + public long fileSize; + } + + [Serializable] + public class Serialization + { + [SerializeField] + List _target; + + public List ToList() + { + return _target; + } + + public Serialization(List target) + { + this._target = target; + } + } public static class FileSystem { public const string ArtResourcePath = "Assets/ArtResources"; @@ -197,29 +221,4 @@ namespace TEngine return www.downloadHandler.text; } } - - [Serializable] - public struct fileMd5 - { - public string fileName; - public string md5; - public long fileSize; - } - - [Serializable] - public class Serialization - { - [SerializeField] - List _target; - - public List ToList() - { - return _target; - } - - public Serialization(List target) - { - this._target = target; - } - } } \ No newline at end of file