From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Login/LoginWin.cs | 123 ++++++++++++++++-------------------------
1 files changed, 48 insertions(+), 75 deletions(-)
diff --git a/Main/System/Login/LoginWin.cs b/Main/System/Login/LoginWin.cs
index 90c2d32..9d9f3ef 100644
--- a/Main/System/Login/LoginWin.cs
+++ b/Main/System/Login/LoginWin.cs
@@ -20,7 +20,7 @@
[SerializeField] Image m_Logo;
- [SerializeField] UIAlphaTween m_AlphaTween;
+ // [SerializeField] UIAlphaTween m_AlphaTween;
[SerializeField] RectTransform m_WaitServerList;
[SerializeField] RectTransform m_ContainerEnterGame;
[SerializeField] RectTransform m_ContainerAccount;
@@ -29,12 +29,12 @@
[SerializeField] Text m_ServerName;
[SerializeField] protected InputField m_Account;
[SerializeField] Button m_EnterGame;
- [SerializeField] Button m_QQLogin;
- [SerializeField] Button m_WXLogin;
+ //[SerializeField] Button m_QQLogin;
+ //[SerializeField] Button m_WXLogin;
[SerializeField] Button m_ServerSelect;
[SerializeField] Button m_SwitchAccount;
[SerializeField] Button m_Notice;
- [SerializeField] Button m_UserHelp;
+ //[SerializeField] Button m_UserHelp;
[SerializeField] Button m_CleanCache;
[SerializeField] Toggle checkRead;
[SerializeField] Button serverRead;
@@ -51,37 +51,36 @@
m_Account.onEndEdit.AddListener(x => { EnterGame(); });
#endif
m_EnterGame.SetListener(EnterGame);
- m_QQLogin.SetListener(QQLogin);
- m_WXLogin.SetListener(WXLogin);
+ //m_QQLogin.SetListener(QQLogin);
+ //m_WXLogin.SetListener(WXLogin);
m_ServerSelect.SetListener(OpenServerListWin);
m_SwitchAccount.SetListener(SwitchAccount);
m_Notice.SetListener(VeiwNotice);
- if (m_UserHelp)
- {
- m_UserHelp.SetListener(OpenUserHelp);
- }
+ //if (m_UserHelp)
+ //{
+ // m_UserHelp.SetListener(OpenUserHelp);
+ //}
m_CleanCache.SetListener(CleanCache);
serverRead.SetListener(() => {
- GameAgeWarnWin win = UIManager.Instance.OpenWindow<GameAgeWarnWin>();
- win.SetFunctionOrder(1);
- // WindowCenter.Instance.OpenFromLocal<GameAgeWarnWin>(1);
+ GameAgeWarnWin.data = 1;
+ UIManager.Instance.OpenWindow<GameAgeWarnWin>();
});
hideRead.SetListener(() => {
- GameAgeWarnWin win = UIManager.Instance.OpenWindow<GameAgeWarnWin>();
- win.SetFunctionOrder(2);
+ GameAgeWarnWin.data = 2;
+ UIManager.Instance.OpenWindow<GameAgeWarnWin>();
});
ageWarn.SetListener(() => {
- GameAgeWarnWin win = UIManager.Instance.OpenWindow<GameAgeWarnWin>();
- win.SetFunctionOrder(3);
+ GameAgeWarnWin.data = 3;
+ UIManager.Instance.OpenWindow<GameAgeWarnWin>();
});
}
- public override void HandleOpen()
+ protected override void OnPreOpen()
{
- base.HandleOpen();
+ base.OnPreOpen();
Debug.Log("鎵撳紑鐧诲綍绐楀彛");
@@ -91,20 +90,32 @@
ServerListCenter.Instance.RequestPlayerServerList();
LoginManager.Instance.isLogined = false;
ServerListCenter.Instance.FiltrateDefaultServerAndServerGroup();
- m_AlphaTween.SetStartState();
+ // m_AlphaTween.SetStartState();
Refresh();
- m_AlphaTween.Play(() => {
- firstOpenEnd = true;
- InGameDownLoad.Instance.downLoadGo = false;
- DownloadMgr.MaxDownLoadTask = InGameDownLoad.Instance.GetMaxTask();
- });
+ // m_AlphaTween.Play(() => {
+ // firstOpenEnd = true;
+ // InGameDownLoad.Instance.downLoadGo = false;
+ // DownloadMgr.MaxDownLoadTask = InGameDownLoad.Instance.GetMaxTask();
+ // });
+ AutoFightModel.Instance.isAutoAttack = false;
+ AutoFightModel.Instance.isPause = false;
+
}
- public override void HandleClose()
+ protected override void OnOpenAnimationComplete()
{
- base.HandleClose();
+ base.OnOpenAnimationComplete();
+
+ firstOpenEnd = true;
+ InGameDownLoad.Instance.downLoadGo = false;
+ DownloadHotMgr.MaxDownLoadTask = InGameDownLoad.Instance.GetMaxTask();
+ }
+
+ protected override void OnPreClose()
+ {
+ base.OnPreClose();
Debug.Log("鍏抽棴鐧诲綍绐楀彛");
ServerListCenter.Instance.serverSelectEvent -= OnServerChange;
ServerListCenter.Instance.onServerListRefreshEvent -= OnServerListRefresh;
@@ -118,10 +129,8 @@
base.Refresh();
Debug.Log("鍒锋柊鐧诲綍绐楀彛");
-
- // 鐗堟湰淇℃伅
- string strVersion = StringUtility.Contact("ver ", InitialFunctionConfig.Get("version").Numerical1);
- verInfo.text = strVersion;
+ //鎵撳寘鐗堟湰 + 鍔熻兘鐗堟湰 + 璇█ID
+ verInfo.text = LoginManager.Instance.GetVersionStr();
var sprite = BuiltInLoader.LoadSprite("TB_DL_Logo");
m_Logo.overrideSprite = sprite;
@@ -158,8 +167,8 @@
ChangeUserInfo(LoginManager.Instance.localSaveAccountName);
m_EnterGame.SetActive(true);
- m_QQLogin.SetActive(false);
- m_WXLogin.SetActive(false);
+ //m_QQLogin.SetActive(false);
+ //m_WXLogin.SetActive(false);
// 鐢ㄦ埛鍗忚 todo
checkRead.isOn = LocalSave.GetBool("tqsecretToggle");
@@ -251,16 +260,6 @@
}
- protected void QQLogin()
- {
- SDKUtils.Instance.TencentLogin("Login");
- }
-
- protected void WXLogin()
- {
- SDKUtils.Instance.TencentLogin("Loginwx");
- }
-
private void OpenServerListWin()
{
UIManager.Instance.OpenWindow<ServerListWin>();
@@ -277,11 +276,11 @@
GameNotice.OpenGameNoticeForce();
}
- private void OpenUserHelp()
- {
- // TODO YYL
- // UIManager.Instance.OpenWindow<UserHelpWin>();
- }
+ //private void OpenUserHelp()
+ //{
+ // // TODO YYL
+ // // UIManager.Instance.OpenWindow<UserHelpWin>();
+ //}
protected void Login()
{
@@ -320,7 +319,6 @@
if (GameNetSystem.Instance.netState == GameNetSystem.NetState.NerverConnect)
{
- Debug.LogError("AccountLogin -----------");
switch (VersionConfig.Get().versionAuthority)
{
case VersionAuthority.InterTest:
@@ -354,6 +352,7 @@
{
try
{
+ LocalSave.DeleteAll();
// 鑾峰彇persistentDataPath涓嬬殑鎵�鏈夋枃浠跺拰鏂囦欢澶�
string[] files = Directory.GetFiles(ResourcesPath.Instance.ExternalStorePath);
string[] dirs = Directory.GetDirectories(ResourcesPath.Instance.ExternalStorePath);
@@ -361,10 +360,6 @@
// 鍒犻櫎鎵�鏈夋枃浠�
foreach (string file in files)
{
- if (file.Contains("config"))
- {
- continue;
- }
File.Delete(file);
}
@@ -372,30 +367,8 @@
// 閫掑綊鍒犻櫎鎵�鏈夋枃浠跺す
foreach (string dir in dirs)
{
- if (dir.Contains("config"))
- {
- continue;
- }
Directory.Delete(dir, true);
}
-
- files = Directory.GetFiles(ResourcesPath.Instance.ExternalStorePath + "/config");
- // foreach (string file in files)
- // {
- // bool isDelete = true;
- // foreach (string filename in ConfigInitiator.builtinConfig)
- // {
- // if (file.Contains(filename))
- // {
- // isDelete = false;
- // break;
- // }
- // }
-
- // if (isDelete)
- // File.Delete(file);
- // }
-
}
catch (System.Exception e)
--
Gitblit v1.8.0