From fceb8af02a3250997ce3a1069e5b037b2f782173 Mon Sep 17 00:00:00 2001 From: zhangaotian <8474238@qq.com> Date: Thu, 4 Jul 2024 13:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Forest/Assets/Art/UI/Prefab/UISyncTip.prefab | 2 +- .../Game => Framework}/AppNetConfig.cs | 17 ++- .../Game => Framework}/AppNetConfig.cs.meta | 0 Forest/Assets/Scripts/Framework/BI/BI.cs | 1 - .../Assets/Scripts/Framework/BI/BIManager.cs | 22 ++-- .../Framework/Event/EventManager.Opt.cs | 2 +- .../Scripts/Framework/Event/EventManager.cs | 8 +- .../Assets/Scripts/Framework/Event/Events.cs | 2 +- .../Framework/Manager/AppInfoManager.cs | 121 ++++++++++-------- .../Framework/Manager/EditorTableManager.cs | 2 +- .../Framework/Manager/RemoteDataIOBase.cs | 1 - .../Scripts/Framework/Manager/TableManager.cs | 10 +- .../Scripts/Framework/UI/LocalizeText.cs | 4 +- .../Scripts/Framework/UI/StringManager.cs | 2 +- .../{Framework => Gameplay}/Constants.meta | 0 .../Constants/Constants.Level.cs | 1 - .../Constants/Constants.Level.cs.meta | 0 .../Constants/Constants.Path.cs | 0 .../Constants/Constants.Path.cs.meta | 0 .../Constants/Constants.UI.cs | 0 .../Constants/Constants.UI.cs.meta | 0 .../GameStartLoadingExecutor.cs | 2 +- .../Gameplay/Login/LoginStatusApple.cs | 2 +- .../Gameplay/Login/LoginStatusFaceBook.cs | 2 +- 24 files changed, 110 insertions(+), 91 deletions(-) rename Forest/Assets/Scripts/{Gameplay/Game => Framework}/AppNetConfig.cs (97%) rename Forest/Assets/Scripts/{Gameplay/Game => Framework}/AppNetConfig.cs.meta (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants.meta (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.Level.cs (99%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.Level.cs.meta (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.Path.cs (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.Path.cs.meta (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.UI.cs (100%) rename Forest/Assets/Scripts/{Framework => Gameplay}/Constants/Constants.UI.cs.meta (100%) diff --git a/Forest/Assets/Art/UI/Prefab/UISyncTip.prefab b/Forest/Assets/Art/UI/Prefab/UISyncTip.prefab index abac595..f4d0053 100644 --- a/Forest/Assets/Art/UI/Prefab/UISyncTip.prefab +++ b/Forest/Assets/Art/UI/Prefab/UISyncTip.prefab @@ -98,7 +98,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &89986407194938043 RectTransform: m_ObjectHideFlags: 0 diff --git a/Forest/Assets/Scripts/Gameplay/Game/AppNetConfig.cs b/Forest/Assets/Scripts/Framework/AppNetConfig.cs similarity index 97% rename from Forest/Assets/Scripts/Gameplay/Game/AppNetConfig.cs rename to Forest/Assets/Scripts/Framework/AppNetConfig.cs index 0c3bb26..c097713 100644 --- a/Forest/Assets/Scripts/Gameplay/Game/AppNetConfig.cs +++ b/Forest/Assets/Scripts/Framework/AppNetConfig.cs @@ -19,6 +19,9 @@ public enum NetRequestStatus public class AppNetConfig : MonoBehaviour { + /// + /// 请求服务器返回信息类 + /// private class ServerResponseInfo { public int code = -1; @@ -26,6 +29,9 @@ public class AppNetConfig : MonoBehaviour public string data; } + /// + /// 请求获取数据类 + /// private class PostData { public string action; @@ -35,7 +41,9 @@ public class AppNetConfig : MonoBehaviour public string client_type; public string game_data; } - + /// + /// 请求上传数据类 + /// private class UploadPostData { public string action; @@ -74,13 +82,13 @@ public class AppNetConfig : MonoBehaviour _serverData = new ServerResponseInfo(); _uploadPostData = new UploadPostData(); EventManager.Instance.Register(EventManager.EventName.UploadToRemote, StartUpload); - EventManager.Instance.Register(EventManager.EventName.NewUserLogin, SaveRemoteData); + EventManager.Instance.Register(EventManager.EventName.NewUserLogin, SaveNewUserData); } private void OnDestroy() { EventManager.Instance.Unregister(EventManager.EventName.UploadToRemote, StartUpload); - EventManager.Instance.Unregister(EventManager.EventName.NewUserLogin, SaveRemoteData); + EventManager.Instance.Unregister(EventManager.EventName.NewUserLogin, SaveNewUserData); } private void StartUpload(string jsonData) @@ -89,7 +97,7 @@ public class AppNetConfig : MonoBehaviour _upload = true; } - private void SaveRemoteData() + private void SaveNewUserData() { DebugUtil.LogWarning("新玩家"); var jsonData = JsonConvert.SerializeObject(AppInfoManager.Instance.RemoteAppUserInfo); @@ -98,7 +106,6 @@ public class AppNetConfig : MonoBehaviour private void BindThirdID() { - DebugUtil.Log("绑定第三方数据据"); var jsonData = JsonConvert.SerializeObject(AppInfoManager.Instance.AppUserInfo); UploadDataToServer(jsonData); } diff --git a/Forest/Assets/Scripts/Gameplay/Game/AppNetConfig.cs.meta b/Forest/Assets/Scripts/Framework/AppNetConfig.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Game/AppNetConfig.cs.meta rename to Forest/Assets/Scripts/Framework/AppNetConfig.cs.meta diff --git a/Forest/Assets/Scripts/Framework/BI/BI.cs b/Forest/Assets/Scripts/Framework/BI/BI.cs index 840bb03..32033da 100644 --- a/Forest/Assets/Scripts/Framework/BI/BI.cs +++ b/Forest/Assets/Scripts/Framework/BI/BI.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using UnityEngine.Scripting; namespace Framework.BI { diff --git a/Forest/Assets/Scripts/Framework/BI/BIManager.cs b/Forest/Assets/Scripts/Framework/BI/BIManager.cs index adaeeda..4ed1aaa 100644 --- a/Forest/Assets/Scripts/Framework/BI/BIManager.cs +++ b/Forest/Assets/Scripts/Framework/BI/BIManager.cs @@ -19,7 +19,7 @@ namespace Framework.BI ByCash, } - public StorageEvent StorageEvent; + private StorageEvent _storageEvent; public string ThirdID { @@ -46,8 +46,8 @@ namespace Framework.BI _biService?.SetUser(DeviceHelper.GetDeviceId()); _biService?.SetUserProperty("platform", DeviceHelper.GetPlatformString()); - StorageEvent = StorageManager.Instance.GetStorage("StorageEvent"); - StorageEvent ??= new StorageEvent(); + _storageEvent = StorageManager.Instance.GetStorage("StorageEvent"); + _storageEvent ??= new StorageEvent(); _isInit = true; } @@ -56,14 +56,14 @@ namespace Framework.BI { } - public bool IsRecorded(cfg.BI.EventFirst eventName) + private bool IsRecorded(cfg.BI.EventFirst eventName) { - return StorageEvent.EventList.Contains(eventName); + return _storageEvent.EventList.Contains(eventName); } - public bool IsRecorded(string eventName) + private bool IsRecorded(string eventName) { - return StorageEvent.EventStringList.Contains(eventName); + return _storageEvent.EventStringList.Contains(eventName); } public void TrackEventOnce(cfg.BI.EventFirst eventName) @@ -76,7 +76,7 @@ namespace Framework.BI } else { - StorageEvent.EventList.Add(eventName); + _storageEvent.EventList.Add(eventName); StorageManager.Instance.SyncForce = true; _biService?.ReportEvent(eventName.ToString()); } @@ -113,7 +113,7 @@ namespace Framework.BI _biService?.ReportEvent(eventName.ToString(), userParam); _tempEventDictionary.Clear(); - StorageEvent.EventList.Add(eventName); + _storageEvent.EventList.Add(eventName); StorageManager.Instance.SyncForce = true; } } @@ -128,7 +128,7 @@ namespace Framework.BI } else { - StorageEvent.EventStringList.Add(eventName); + _storageEvent.EventStringList.Add(eventName); StorageManager.Instance.SyncForce = true; _biService?.ReportEvent(eventName); } @@ -234,7 +234,7 @@ namespace Framework.BI _biService?.ReportEvent(eventName.ToString(), levelParam); - StorageEvent.EventList.Add(eventName); + _storageEvent.EventList.Add(eventName); StorageManager.Instance.SyncForce = true; } } diff --git a/Forest/Assets/Scripts/Framework/Event/EventManager.Opt.cs b/Forest/Assets/Scripts/Framework/Event/EventManager.Opt.cs index 7b0ae38..477d705 100644 --- a/Forest/Assets/Scripts/Framework/Event/EventManager.Opt.cs +++ b/Forest/Assets/Scripts/Framework/Event/EventManager.Opt.cs @@ -22,7 +22,7 @@ namespace Framework.Event private void ReCycleTempExecuteList(List list) { - if (_tempExecutePool.Count < MAX_EVENT_STACK) + if (_tempExecutePool.Count < MaxEventStack) { list.Clear(); _tempExecutePool.Push(list); diff --git a/Forest/Assets/Scripts/Framework/Event/EventManager.cs b/Forest/Assets/Scripts/Framework/Event/EventManager.cs index 040f47a..4087c0b 100644 --- a/Forest/Assets/Scripts/Framework/Event/EventManager.cs +++ b/Forest/Assets/Scripts/Framework/Event/EventManager.cs @@ -1,6 +1,6 @@ using System; -using System.Collections.Generic; using PhxhSDK; +using System.Collections.Generic; namespace Framework.Event { @@ -16,7 +16,7 @@ namespace Framework.Event remove => _afterSendCallBack -= value; } - public const int MAX_EVENT_STACK = 3; + private const int MaxEventStack = 3; public void Register(EventName eventName, Action action) { @@ -177,9 +177,9 @@ namespace Framework.Event private bool EventStackReachMax(int current) { - if (current > MAX_EVENT_STACK) + if (current > MaxEventStack) { - DebugUtil.EditorAssert(_eventStack <= MAX_EVENT_STACK, $"EventSystem.Send : {MAX_EVENT_STACK}"); + DebugUtil.EditorAssert(_eventStack <= MaxEventStack, $"EventSystem.Send : {MaxEventStack}"); return true; } diff --git a/Forest/Assets/Scripts/Framework/Event/Events.cs b/Forest/Assets/Scripts/Framework/Event/Events.cs index 21e093c..b62d850 100644 --- a/Forest/Assets/Scripts/Framework/Event/Events.cs +++ b/Forest/Assets/Scripts/Framework/Event/Events.cs @@ -6,7 +6,7 @@ namespace Framework.Event { LevelGameWin, LevelGameLose, - LoginSuccess, + //LoginSuccess, LoginFail, NewBieGuideNext, NewBieGuideFinish, diff --git a/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs b/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs index fcaa62c..9810f08 100644 --- a/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs @@ -4,6 +4,9 @@ using Framework.Event; using Framework.Manager; using LC.Newtonsoft.Json; +/// +/// 用户需要上传至服务器的的游戏数据类 +/// public class AppUserInfo { public UserInfo UserInfo; @@ -38,27 +41,22 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable public bool GetRemoteInfo; /// - /// 是否需要同步数据 + /// 是否需要展示同步数据UI /// public bool UpdateConfirm; /// - /// 存取数据的方式 + /// 存取数据的方式 本地/登录 /// public NetConfigID CurLoginState = NetConfigID.None; - /// - /// 数据是否同步至最新 - /// - private bool _isUpdateToLatest; - /// /// 向服务器请求的间隔时间 /// - private float RemoteInterval = 10.0f; + private const float RemoteInterval = 10.0f; + //临时变量 private float RemoteTickTime { get; set; } - private bool _init; private string _tempIdToken = ""; private LoginStatusID _tempLoginStatus; @@ -68,7 +66,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable _appUserInfo = StorageManager.Instance.GetStorage("UserInfo"); _appUserInfo ??= new AppUserInfo(); SyncInfo(RemoteAppUserInfo, _appUserInfo); - DebugUtil.Log("本地读到的信息: UserID: {0}, ThirdID: {1}", + DebugUtil.Log("本地读到的玩家ID信息: UserID: {0}, ThirdID: {1}", _appUserInfo.UserInfo.UserID, _appUserInfo.UserInfo.ThirdId); } @@ -76,11 +74,11 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable { if (_init) return; - //检测本地是否有缓存 + + //检测本地是否有第三方缓存 有缓存则向服务器请求 CurLoginState = !string.IsNullOrEmpty(_appUserInfo.UserInfo.ThirdId) ? NetConfigID.ThirdID : NetConfigID.DeviceID; - LoginManager.Instance.IsLogin = !string.IsNullOrEmpty(_appUserInfo.UserInfo.ThirdId); AppNetConfig.State = NetRequestStatus.Start; _init = true; @@ -88,6 +86,9 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable DebugUtil.Log("当前的向服务器请求的账号是: {0},登录状态: {1}", CurLoginState, LoginManager.Instance.IsLogin); } + /// + /// 当前存取数据的ID + /// public string GetUniqueID() { return CurLoginState == NetConfigID.ThirdID @@ -100,6 +101,36 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable return ((int)CurLoginState).ToString(); } + + #region 玩家数据设置 + + public void SetLocalVersion(ulong version) + { + _appUserInfo.UserInfo.Version = version; + } + + public void SetRemoteVersion(ulong version) + { + RemoteAppUserInfo.UserInfo.Version = version; + } + + public void SetRemoteData(int newCoins = 0, string newPassLevel = null) + { + if (newCoins != 0) + { + RemoteAppUserInfo.Coins = newCoins; + } + + if (!string.IsNullOrEmpty(newPassLevel)) + { + RemoteAppUserInfo.PassLevel = newPassLevel; + } + } + + #endregion + + #region 登录情况处理 + /// /// 第三方成功登录后 更新本地用户信息 /// @@ -114,36 +145,8 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable _appUserInfo.UserInfo.UserID, _appUserInfo.UserInfo.ThirdId, _appUserInfo.LoginStatusID); } - public void SetLocalVersion(ulong version) - { - _appUserInfo.UserInfo.Version = version; - } - - public void SetRemoteVersion(ulong version) - { - RemoteAppUserInfo.UserInfo.Version = version; - } - - public void SetRemoteData(int newCoins = 0, string newPassLevel = null) - { - if (newCoins != 0 && _isUpdateToLatest) - { - RemoteAppUserInfo.Coins = newCoins; - } - - if (!string.IsNullOrEmpty(newPassLevel) && _isUpdateToLatest) - { - RemoteAppUserInfo.PassLevel = newPassLevel; - } - } - - public bool CheckLogin() - { - return AppUserInfo.LoginStatusID != LoginStatusID.None && !string.IsNullOrEmpty(AppUserInfo.UserInfo.ThirdId); - } - /// - /// 设备id登录成功 有第三方id数据和无的处理方式 + /// 设备id登录成功 第三方id数据有和无的处理方式 /// public void DeviceIdGetSuccess(string gameData) { @@ -159,7 +162,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable CurLoginState = NetConfigID.ThirdID; AppNetConfig.State = NetRequestStatus.Start; } - //无 直接比对 + //无 直接比对数据 else { DebugUtil.Log("设备id登录成功,无第三方id数据"); @@ -191,7 +194,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable CurLoginState = NetConfigID.ThirdID; SyncVersion(); } - + private void SyncVersion() { GetRemoteInfo = true; @@ -208,7 +211,6 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable } else { - _isUpdateToLatest = true; SyncInfo(_appUserInfo, RemoteAppUserInfo); DebugUtil.LogWarning("仅版本不同, 更新版本, 远端: {0}, 本地: {1}", remoteVersion, localVersion); StorageManager.Instance.SyncForce = true; @@ -226,7 +228,6 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable } else { - _isUpdateToLatest = true; SyncInfo(RemoteAppUserInfo, _appUserInfo); DebugUtil.LogWarning("仅版本不同, 更新版本, 远端: {0}, 本地: {1}", remoteVersion, localVersion); StorageManager.Instance.SyncForce = true; @@ -235,13 +236,22 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable } else { - _isUpdateToLatest = true; DebugUtil.Log("远端和本地数据相同,不需要更新"); } } + #endregion + /// - /// 界面选择数据进行同步 + /// 检查是否已登录 + /// + public bool CheckIfLogin() + { + return AppUserInfo.LoginStatusID != LoginStatusID.None && !string.IsNullOrEmpty(AppUserInfo.UserInfo.ThirdId); + } + + /// + /// 界面玩家选择同步数据方法 /// public void SyncGameData(bool toRemote = true) { @@ -256,16 +266,21 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable DebugUtil.LogWarning("更新至本地数据"); } - _isUpdateToLatest = true; UpdateConfirm = false; EventManager.Instance.Send(EventManager.EventName.RefreshGameData); StorageManager.Instance.SyncForce = true; StorageManager.Instance.SyncRemoteForce = true; } - + + /// + /// 复制用户数据 + /// + /// 旧数据 + /// 新数据 + /// 是否更为空数据 private void SyncInfo(AppUserInfo userInfo, AppUserInfo newUserInfo, bool isEmpty = false) { - string json = JsonConvert.SerializeObject(newUserInfo); + var json = JsonConvert.SerializeObject(newUserInfo); AppUserInfo tempInfo = JsonConvert.DeserializeObject(json); userInfo.UserInfo.ThirdId = tempInfo.UserInfo.ThirdId; @@ -283,7 +298,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable newUserInfo.LoginStatusID = _tempLoginStatus; } } - + /// /// 退出第三方 存取方式为DeviceID 登录状态为None 本地和Remote的ThirdID为null /// @@ -297,7 +312,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable StorageManager.Instance.SyncForce = true; StorageManager.Instance.SyncRemoteForce = true; } - + public void Update(float deltaTime) { RemoteTickTime += deltaTime; @@ -312,7 +327,7 @@ public class AppInfoManager : Singlenton, IInitable, IUpdatable public void Release() { } - + /// /// Debug 清空设备服务器数据包括本地登录缓存 /// diff --git a/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs b/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs index 9f4daba..c6c4d5f 100644 --- a/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs @@ -50,7 +50,7 @@ namespace Framework.Manager { return key; } - return getValue.Value; + return getValue.ValueEn; } } #endif diff --git a/Forest/Assets/Scripts/Framework/Manager/RemoteDataIOBase.cs b/Forest/Assets/Scripts/Framework/Manager/RemoteDataIOBase.cs index 4196e79..33fe393 100644 --- a/Forest/Assets/Scripts/Framework/Manager/RemoteDataIOBase.cs +++ b/Forest/Assets/Scripts/Framework/Manager/RemoteDataIOBase.cs @@ -1,4 +1,3 @@ -using System.IO; using Framework.Event; using LC.Newtonsoft.Json; using LC.Newtonsoft.Json.Linq; diff --git a/Forest/Assets/Scripts/Framework/Manager/TableManager.cs b/Forest/Assets/Scripts/Framework/Manager/TableManager.cs index 5a86e05..ddbd8b9 100644 --- a/Forest/Assets/Scripts/Framework/Manager/TableManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/TableManager.cs @@ -19,15 +19,15 @@ namespace Framework { } - public static JSONNode LoadByteBuf(string file) + private static JSONNode LoadByteBuf(string file) { - var filePath = _CombiePath(file); + var filePath = _CombinePath(file); var loadAsset = AssetManager.Instance.LoadAsset(filePath); var jsonText = loadAsset.text; return JSON.Parse(jsonText); } - private static string _CombiePath(string fileName) + private static string _CombinePath(string fileName) { return string.Format(Constants.Constants.TableDataConfigPath, fileName); } @@ -57,13 +57,13 @@ namespace Framework private void _UnlockJson(string fileName) { - var fullPath = _CombiePath(fileName); + var fullPath = _CombinePath(fileName); AssetManager.Instance.Unload(fullPath); } private void _PostPreload(string fileName) { - var fullPath = _CombiePath(fileName); + var fullPath = _CombinePath(fileName); AssetManager.Instance.PostPreload(fullPath); } diff --git a/Forest/Assets/Scripts/Framework/UI/LocalizeText.cs b/Forest/Assets/Scripts/Framework/UI/LocalizeText.cs index febbe02..e57435e 100644 --- a/Forest/Assets/Scripts/Framework/UI/LocalizeText.cs +++ b/Forest/Assets/Scripts/Framework/UI/LocalizeText.cs @@ -1,8 +1,8 @@ -using Framework.Event; using Framework.Manager; +using Framework.Event; using Framework.UI; -using TMPro; using UnityEngine; +using TMPro; [RequireComponent(typeof(TMP_Text))] public class LocalizeText : MonoBehaviour diff --git a/Forest/Assets/Scripts/Framework/UI/StringManager.cs b/Forest/Assets/Scripts/Framework/UI/StringManager.cs index 36b75a1..977019c 100644 --- a/Forest/Assets/Scripts/Framework/UI/StringManager.cs +++ b/Forest/Assets/Scripts/Framework/UI/StringManager.cs @@ -99,7 +99,7 @@ namespace Framework.UI { case (LanguageType.Default): { - value = data.Value; + value = data.ValueEn; break; } case (LanguageType.CN): diff --git a/Forest/Assets/Scripts/Framework/Constants.meta b/Forest/Assets/Scripts/Gameplay/Constants.meta similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants.meta rename to Forest/Assets/Scripts/Gameplay/Constants.meta diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs b/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs similarity index 99% rename from Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs index f4f5b6d..61775d1 100644 --- a/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs +++ b/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs @@ -1,4 +1,3 @@ -using UnityEngine; namespace Framework.Constants { diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs.meta b/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs.meta rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs.meta diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs b/Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs.meta b/Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs.meta rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs.meta diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs b/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs diff --git a/Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs.meta b/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs.meta rename to Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs.meta diff --git a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs index c89fe61..5159e97 100644 --- a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs +++ b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs @@ -62,7 +62,7 @@ namespace Gameplay.LoadingExecutor if (AppInfoManager.Instance.UpdateConfirm) await UIManager.Instance.OpenWindow(UIConstants.UISyncTip); - if (!AppInfoManager.Instance.CheckLogin() && !LoginManager.Instance.ShowLogin) + if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin) await UIManager.Instance.OpenWindow(UIConstants.UILogin); if (!PlayerPrefs.HasKey(LevelConstants.FirstLaunch)) diff --git a/Forest/Assets/Scripts/Gameplay/Login/LoginStatusApple.cs b/Forest/Assets/Scripts/Gameplay/Login/LoginStatusApple.cs index 4d250e6..25d521b 100644 --- a/Forest/Assets/Scripts/Gameplay/Login/LoginStatusApple.cs +++ b/Forest/Assets/Scripts/Gameplay/Login/LoginStatusApple.cs @@ -64,7 +64,7 @@ public class LoginStatusApple : LoginStatus //从服务器获取数据 GetDataFromSever(); - EventManager.Instance.Send(EventManager.EventName.LoginSuccess); + //EventManager.Instance.Send(EventManager.EventName.LoginSuccess); DebugUtil.LogWarning("Apple登录成功:userID: {0}", userID); } diff --git a/Forest/Assets/Scripts/Gameplay/Login/LoginStatusFaceBook.cs b/Forest/Assets/Scripts/Gameplay/Login/LoginStatusFaceBook.cs index e623e7e..fb78fce 100644 --- a/Forest/Assets/Scripts/Gameplay/Login/LoginStatusFaceBook.cs +++ b/Forest/Assets/Scripts/Gameplay/Login/LoginStatusFaceBook.cs @@ -56,7 +56,7 @@ namespace Gameplay.Login //从服务器获取数据 GetDataFromSever(); - EventManager.Instance.Send(EventManager.EventName.LoginSuccess); + //EventManager.Instance.Send(EventManager.EventName.LoginSuccess); DebugUtil.LogWarning("FaceBook登录成功:userID: {0}", userID); }