|
@@ -1,6 +1,7 @@
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
using ET;
|
|
using ET;
|
|
using static GFGGame.LauncherConfig;
|
|
using static GFGGame.LauncherConfig;
|
|
|
|
+using System;
|
|
|
|
|
|
namespace GFGGame
|
|
namespace GFGGame
|
|
{
|
|
{
|
|
@@ -343,11 +344,21 @@ namespace GFGGame
|
|
ViewManager.Show<MainUIView>(null, null, true);
|
|
ViewManager.Show<MainUIView>(null, null, true);
|
|
}
|
|
}
|
|
|
|
|
|
- public static void ShowExitAlert()
|
|
|
|
|
|
+ public static void ShowExitAlert(Action sureCallback = null)
|
|
{
|
|
{
|
|
AlertSystem.Show("我会想你的")
|
|
AlertSystem.Show("我会想你的")
|
|
.SetLeftButton(true, "继续游戏")
|
|
.SetLeftButton(true, "继续游戏")
|
|
- .SetRightButton(true, "退出游戏", (object data) => { Application.Quit(); });
|
|
|
|
|
|
+ .SetRightButton(true, "退出游戏", (object data) =>
|
|
|
|
+ {
|
|
|
|
+ if(sureCallback != null)
|
|
|
|
+ {
|
|
|
|
+ sureCallback.Invoke();
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Application.Quit();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|