mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
整理代码
整理代码
This commit is contained in:
@@ -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<string, string> _fileFixList = new Dictionary<string, string>();
|
||||
@@ -162,30 +161,6 @@ namespace TEngine
|
||||
return $"{AppId}.{ResId}";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否重新安装
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal bool IsReinstall()
|
||||
{
|
||||
return File.Exists($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置重新安装了
|
||||
/// </summary>
|
||||
internal void SignReInstall()
|
||||
{
|
||||
ReInstallFinish();
|
||||
File.Create($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}");
|
||||
}
|
||||
/// <summary>
|
||||
/// 去掉重新安装标志文件
|
||||
/// </summary>
|
||||
internal void ReInstallFinish()
|
||||
{
|
||||
DeleteFile($"{FileSystem.ResourceRoot}/{RESTALLCONFIG}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除文件
|
||||
|
@@ -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<T>
|
||||
{
|
||||
[SerializeField]
|
||||
List<T> _target;
|
||||
|
||||
public List<T> ToList()
|
||||
{
|
||||
return _target;
|
||||
}
|
||||
|
||||
public Serialization(List<T> 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<T>
|
||||
{
|
||||
[SerializeField]
|
||||
List<T> _target;
|
||||
|
||||
public List<T> ToList()
|
||||
{
|
||||
return _target;
|
||||
}
|
||||
|
||||
public Serialization(List<T> target)
|
||||
{
|
||||
this._target = target;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user