Compare commits

..

No commits in common. "7761769752b5ab2e590a59dd8d87a9684395c24e" and "614c726a7ced8467b83e0f76b9e9f987dadf4c5f" have entirely different histories.

2 changed files with 9 additions and 1 deletions

View File

@ -40,6 +40,11 @@ public class DateManager : MonoBehaviour
try
{
string datas = DecryptFileReader.ReadAndDecryptData("Timer.txt");
if (string.IsNullOrEmpty(datas))
{
updateTimer?.Invoke();
return;
}
EndTimer = datas.Split('|')[0];
RecordData = datas.Split('|')[1];
//第一次获取获取系统时间

View File

@ -11,7 +11,10 @@ public class DecryptFileReader
public static string ReadAndDecryptData(string filePath)
{
string fullPath = Path.Combine(Application.streamingAssetsPath, filePath);
if (File.Exists(filePath)) return "";
if (File.Exists(fullPath) == false)
{
return "";
}
// 读取加密文件
byte[] encryptedData = File.ReadAllBytes(fullPath);