Merge branch 'NewMaster' into LouDi_Pig
This commit is contained in:
commit
3e91983031
@ -969,7 +969,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 888371916723674439}
|
||||
- {fileID: 7622962939547687553}
|
||||
m_Father: {fileID: 1269024859}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@ -989,7 +989,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 718cf7f3f1b16f141ab751a37af8cae1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ui: {fileID: 2089839050043354719}
|
||||
ui: {fileID: 7245332692720103295}
|
||||
text: {fileID: 4601331229292980818}
|
||||
btn: {fileID: 7231834583498103603}
|
||||
--- !u!1 &2114935602
|
||||
@ -1263,26 +1263,6 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!224 &888371916723674439
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089839050043354719}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7622962939547687553}
|
||||
m_Father: {fileID: 1764640267}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -1920, y: -1080}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &902241654539185805
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1337,7 +1317,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.5019608}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
@ -1557,24 +1537,6 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &2089839050043354719
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 888371916723674439}
|
||||
- component: {fileID: 7923541361196308593}
|
||||
- component: {fileID: 4452057681510801829}
|
||||
m_Layer: 5
|
||||
m_Name: UITipWindow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2521152647019992497
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1890,21 +1852,6 @@ MonoBehaviour:
|
||||
CustomComponentName: BtnContent
|
||||
CustomComment:
|
||||
mComponentName: RectTransform
|
||||
--- !u!114 &4452057681510801829
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089839050043354719}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cadc477eb7be81c4b899b49b072235bd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Label: {fileID: 4601331229292980818}
|
||||
BtnContent: {fileID: 2655579637452759910}
|
||||
BtnPrefab: {fileID: 7231834583498103603}
|
||||
--- !u!114 &4467067367704618080
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2289,13 +2236,13 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7245332692720103295}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3877370567018537602}
|
||||
m_Father: {fileID: 888371916723674439}
|
||||
m_Father: {fileID: 1764640267}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@ -2341,14 +2288,6 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 23.5}
|
||||
m_SizeDelta: {x: 51, y: 51}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7923541361196308593
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2089839050043354719}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7937913353350945267
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -52,6 +52,29 @@ public class FixedMainEditor
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/生成Timer文件")]
|
||||
private static void GeneratorTimer()
|
||||
{
|
||||
if (File.Exists(Application.dataPath + "/TimerLock.asset"))
|
||||
{
|
||||
string path = "Assets/TimerLock.asset";
|
||||
var asset = AssetDatabase.LoadAssetAtPath<TimerLock>(path);
|
||||
if (asset != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(asset.time) == false)
|
||||
{
|
||||
//第一次获取获取系统时间
|
||||
DateTime currentDateTime = DateTime.Now;
|
||||
string RecordData = currentDateTime.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
string strMerge = asset.time + "|" + RecordData;
|
||||
EncryptFileCreator.EncryptAndSaveData(strMerge, "Timer.txt");
|
||||
}
|
||||
}
|
||||
}
|
||||
//刷新界面
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,10 +7,20 @@ using UnityEditor.Build;
|
||||
using UnityEditor.Build.Reporting;
|
||||
using UnityEngine;
|
||||
|
||||
public class VirtualFPostProcess : IPostprocessBuildWithReport
|
||||
public class VirtualFPostProcess : IPostprocessBuildWithReport, IPreprocessBuildWithReport
|
||||
{
|
||||
public int callbackOrder => 0;
|
||||
|
||||
/// <summary>
|
||||
/// 构建前生成时间锁
|
||||
/// </summary>
|
||||
/// <param name="report"></param>
|
||||
public void OnPreprocessBuild(BuildReport report)
|
||||
{
|
||||
// 生成时间锁
|
||||
GneratorTimerLock();
|
||||
}
|
||||
|
||||
public void OnPostprocessBuild(BuildReport report)
|
||||
{
|
||||
string projectPath = Application.dataPath;
|
||||
@ -29,9 +39,7 @@ public class VirtualFPostProcess : IPostprocessBuildWithReport
|
||||
Debug.LogWarning("未找到数据目录: " + dataFolderPath);
|
||||
}
|
||||
DeletAssetBundle(buildOutputPath);
|
||||
|
||||
// 生成时间锁
|
||||
GneratorTimerLock();
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -173,4 +181,6 @@ public class VirtualFPostProcess : IPostprocessBuildWithReport
|
||||
}
|
||||
return new string(chars);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -19,11 +19,15 @@ public class DateManager : MonoBehaviour
|
||||
{
|
||||
Application.Quit();
|
||||
});
|
||||
UpdateTime(ShowTip, ShowTip);
|
||||
UpdateTime(ShowTip, ShowTip, () =>
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowTip(string str)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
ui.SetActive(true);
|
||||
text.text = str;
|
||||
}
|
||||
@ -63,12 +67,14 @@ public class DateManager : MonoBehaviour
|
||||
{
|
||||
Debug.LogError($"数据出错: {e.Message}");
|
||||
error?.Invoke($"数据出错: {e.Message}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (JudgeExpire())
|
||||
{
|
||||
Debug.Log("请联系管理员进行升级");
|
||||
timeOut?.Invoke("请联系管理员进行升级");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user