From 00b308544f2d9d24bde194c7ccd3ce8977ed0561 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Wed, 23 Apr 2025 14:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Tools/ZXKLicenses/Encryption/DateManager.cs | 5 ----- .../Tools/ZXKLicenses/Encryption/DecryptFileReader.cs | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Assets/Scripts/Tools/ZXKLicenses/Encryption/DateManager.cs b/Assets/Scripts/Tools/ZXKLicenses/Encryption/DateManager.cs index 3dfcd51f..f8a93a76 100644 --- a/Assets/Scripts/Tools/ZXKLicenses/Encryption/DateManager.cs +++ b/Assets/Scripts/Tools/ZXKLicenses/Encryption/DateManager.cs @@ -40,11 +40,6 @@ 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]; //第一次获取获取系统时间 diff --git a/Assets/Scripts/Tools/ZXKLicenses/Encryption/DecryptFileReader.cs b/Assets/Scripts/Tools/ZXKLicenses/Encryption/DecryptFileReader.cs index 9a68c1bb..1c6d60f5 100644 --- a/Assets/Scripts/Tools/ZXKLicenses/Encryption/DecryptFileReader.cs +++ b/Assets/Scripts/Tools/ZXKLicenses/Encryption/DecryptFileReader.cs @@ -11,10 +11,7 @@ public class DecryptFileReader public static string ReadAndDecryptData(string filePath) { string fullPath = Path.Combine(Application.streamingAssetsPath, filePath); - if (File.Exists(fullPath) == false) - { - return ""; - } + if (File.Exists(filePath)) return ""; // 读取加密文件 byte[] encryptedData = File.ReadAllBytes(fullPath);