fix:1、更换项目,使用winter来创建

This commit is contained in:
2026-04-22 11:13:16 +08:00
parent 173cfb2dc9
commit 83ff9f71ad
7375 changed files with 209752 additions and 157557 deletions
+12 -3
View File
@@ -1,6 +1,7 @@
using System.IO;
using UnityEngine;
namespace FlowerPower
namespace LoveLegend
{
public class SApplication : MonoBehaviour
{
@@ -48,21 +49,24 @@ namespace FlowerPower
{
// MainThreadDispatcher.Instance.Dispatch(MainThreadMsg.App_Focus_True, focus);
AppDispatcher.Instance.Dispatch(MainThreadMsg.App_Focus_True, focus);
Debug.Log(focus);
}
else
{
AppDispatcher.Instance.Dispatch(MainThreadMsg.App_Pause_False, focus);
SaveData.SaveDataFunc();
LastFocusFlaseTime = DateTimeManager.Instance.GetServerCurrTimestamp();
AppDispatcher.Instance.Dispatch(AppMsg.App_Focus_False, focus);
SaveData.saveDataFunc();
}
}
private void OnApplicationPause(bool pause)
{
Debug.Log("pause========");
IsAppPause = pause;
if (pause)
{
AppDispatcher.Instance.Dispatch(AppMsg.App_Pause_True, pause);
AppDispatcher.Instance.Dispatch(MainThreadMsg.App_Focus_True, pause);
}
else
{
@@ -73,6 +77,11 @@ namespace FlowerPower
private void OnApplicationQuit()
{
IsAppQuit = true;
string cachePath = Application.temporaryCachePath;
if (Directory.Exists(cachePath))
{
Directory.Delete(cachePath, true); // true 表示递归删除
}
CloseApp();
AppDispatcher.Instance.Dispatch(AppMsg.App_Quit);