修改逻辑
This commit is contained in:
parent
71418f2ac1
commit
00b308544f
@ -40,11 +40,6 @@ public class DateManager : MonoBehaviour
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
string datas = DecryptFileReader.ReadAndDecryptData("Timer.txt");
|
string datas = DecryptFileReader.ReadAndDecryptData("Timer.txt");
|
||||||
if (string.IsNullOrEmpty(datas))
|
|
||||||
{
|
|
||||||
updateTimer?.Invoke();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
EndTimer = datas.Split('|')[0];
|
EndTimer = datas.Split('|')[0];
|
||||||
RecordData = datas.Split('|')[1];
|
RecordData = datas.Split('|')[1];
|
||||||
//第一次获取获取系统时间
|
//第一次获取获取系统时间
|
||||||
|
|||||||
@ -11,10 +11,7 @@ public class DecryptFileReader
|
|||||||
public static string ReadAndDecryptData(string filePath)
|
public static string ReadAndDecryptData(string filePath)
|
||||||
{
|
{
|
||||||
string fullPath = Path.Combine(Application.streamingAssetsPath, filePath);
|
string fullPath = Path.Combine(Application.streamingAssetsPath, filePath);
|
||||||
if (File.Exists(fullPath) == false)
|
if (File.Exists(filePath)) return "";
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
// 读取加密文件
|
// 读取加密文件
|
||||||
byte[] encryptedData = File.ReadAllBytes(fullPath);
|
byte[] encryptedData = File.ReadAllBytes(fullPath);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user