fix:1、更换项目,使用winter来创建
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user