From b4833ef177bd5d7ab57beea91ea3072f97b5ef57 Mon Sep 17 00:00:00 2001 From: zhangaotian <8474238@qq.com> Date: Thu, 8 Aug 2024 19:16:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4=E3=80=81=E5=BD=92?= =?UTF-8?q?=E7=BA=B3=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameBuild/GameBuildEditorInspector.cs | 2 +- .../Assets/Editor/Level/LevelEditorWindow.cs | 16 +-- .../{Gameplay => Framework}/Constants.meta | 0 .../Constants/Constants.Level.cs | 6 - .../Constants/Constants.Level.cs.meta | 0 .../Constants/Constants.Path.cs | 8 +- .../Constants/Constants.Path.cs.meta | 0 .../Constants/Constants.UI.cs | 0 .../Constants/Constants.UI.cs.meta | 0 .../Scripts/Framework/Guide/GuideMananger.cs | 6 +- .../Scripts/Framework/Login/LoginManager.cs | 8 +- .../Scripts/Framework/Login/LoginStatus.cs | 6 +- .../Framework/Login/LoginStatusApple.cs | 129 +++++++++--------- .../Framework/Login/LoginStatusFaceBook.cs | 10 +- .../Framework/Manager/AppInfoManager.cs | 2 +- .../Scripts/Framework/Manager/AudioManager.cs | 23 ++-- .../Scripts/Framework/Manager/BuildManager.cs | 2 +- .../Framework/Manager/EditorTableManager.cs | 2 +- .../Framework/Manager/SettingManager.cs | 59 -------- .../Scripts/Framework/Manager/TableManager.cs | 2 +- Forest/Assets/Scripts/Framework/Setting.meta | 8 ++ .../Framework/Setting/SettingManager.cs | 75 ++++++++++ .../SettingManager.cs.meta | 0 Forest/Assets/Scripts/Framework/UI/UIRoot.cs | 2 +- .../Gameplay/ForestLevel/KongManager.cs | 2 +- .../Scripts/Gameplay/ForestLevel/Level.cs | 6 +- .../Gameplay/ForestLevel/PlankManager.cs | 4 +- Forest/Assets/Scripts/Gameplay/Game/MyGame.cs | 2 +- .../GameStartLoadingExecutor.cs | 13 +- .../LoadingExecutor/LevelLoadingExecutor.cs | 3 +- .../Scripts/Gameplay/Manager/GfxManager.cs | 6 +- .../Gameplay/Manager/LevelSelectManager.cs | 3 +- .../UI/Other/UILoginPanelController.cs | 2 +- .../Gameplay/UI/Other/UIScoreController.cs | 2 +- .../UI/Other/UIUserAgreementController.cs | 6 +- .../UI/StartPanel/UISettingPanelController.cs | 3 +- 36 files changed, 211 insertions(+), 207 deletions(-) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants.meta (100%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.Level.cs (93%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.Level.cs.meta (100%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.Path.cs (88%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.Path.cs.meta (100%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.UI.cs (100%) rename Forest/Assets/Scripts/{Gameplay => Framework}/Constants/Constants.UI.cs.meta (100%) delete mode 100644 Forest/Assets/Scripts/Framework/Manager/SettingManager.cs create mode 100644 Forest/Assets/Scripts/Framework/Setting.meta create mode 100644 Forest/Assets/Scripts/Framework/Setting/SettingManager.cs rename Forest/Assets/Scripts/Framework/{Manager => Setting}/SettingManager.cs.meta (100%) diff --git a/Forest/Assets/Editor/GameBuild/GameBuildEditorInspector.cs b/Forest/Assets/Editor/GameBuild/GameBuildEditorInspector.cs index 8289055..e4e3e5d 100644 --- a/Forest/Assets/Editor/GameBuild/GameBuildEditorInspector.cs +++ b/Forest/Assets/Editor/GameBuild/GameBuildEditorInspector.cs @@ -40,7 +40,7 @@ public class GameBuildEditorInspector : OdinEditor _buildName = _buildName.Replace(" ", ""); var configName = $"{_buildName}"; - var configPath = string.Format(Constants.BuildConfigPath, configName); + var configPath = string.Format(PathConstants.BuildConfigPath, configName); var savedConfig = AssetDatabase.LoadAssetAtPath(configPath); if (savedConfig != null) { diff --git a/Forest/Assets/Editor/Level/LevelEditorWindow.cs b/Forest/Assets/Editor/Level/LevelEditorWindow.cs index 3552e1d..e3cecbc 100644 --- a/Forest/Assets/Editor/Level/LevelEditorWindow.cs +++ b/Forest/Assets/Editor/Level/LevelEditorWindow.cs @@ -173,7 +173,7 @@ public class LevelEditorWindow : OdinEditorWindow private void CreateHole(List xPos, List yPos) { - var tHole = AssetDatabase.LoadAssetAtPath(string.Format(Constants.ItemPrefabPath, "Kong")); + var tHole = AssetDatabase.LoadAssetAtPath(string.Format(PathConstants.ItemPrefabPath, "Kong")); var kongRoot = GameObject.Find("KongRoot"); _holeWithoutEmpty = new Dictionary(); _holeDic = new Dictionary(); @@ -400,14 +400,14 @@ public class LevelEditorWindow : OdinEditorWindow foreach (var pos in plankPos) { //加载Plank实例 - var tPlank = AssetDatabase.LoadAssetAtPath(string.Format(Constants.PlankPrefabPath, plankName)); + var tPlank = AssetDatabase.LoadAssetAtPath(string.Format(PathConstants.PlankPrefabPath, plankName)); var plank = Instantiate(tPlank, pos.Key, tPlank.transform.rotation); var sortLayer = plank.GetComponent().sortingOrder; //加载HoleOfPlank实例 foreach (var index in pos.Value) { var holePos = _holeWithoutEmpty[string.Format("Kong{0}", index)].Obj.transform.position; - var tHole = AssetDatabase.LoadAssetAtPath(string.Format(Constants.ItemPrefabPath, + var tHole = AssetDatabase.LoadAssetAtPath(string.Format(PathConstants.ItemPrefabPath, HoleOfPlank)); var hole = Instantiate(tHole, holePos, tHole.transform.rotation); hole.transform.SetParent(plank.transform, true); @@ -1590,10 +1590,10 @@ public class LevelEditorWindow : OdinEditorWindow _levelIds.RemoveAll(level => level.LevelID == levelID); _levelIds.Add(new AllLevelID(levelID)); - var levelConfigPath = string.Format(Constants.LevelConfigPath, levelID); + var levelConfigPath = string.Format(PathConstants.LevelConfigPath, levelID); JsonHelper.SaveJson(levelConfigPath, curLevelData); - var levelListConfigPath = string.Format(Constants.LevelListPath); + var levelListConfigPath = string.Format(PathConstants.LevelListPath); JsonHelper.SaveJson(levelListConfigPath, _levelIds); DestroyPlanks(); @@ -1638,7 +1638,7 @@ public class LevelEditorWindow : OdinEditorWindow [MenuItem("Tools/关卡生成器")] private static void OpenWindow() { - EditorSceneManager.OpenScene(Constants.LevelGenerator); + EditorSceneManager.OpenScene(PathConstants.LevelGenerator); _thisWindow = GetWindow(); _thisWindow.position = GUIHelper.GetEditorWindowRect().AlignCenter(800, 600); _thisWindow.InitLevelList(); @@ -1658,7 +1658,7 @@ public class LevelEditorWindow : OdinEditorWindow var plankClass = new CustomPlank(); plankClass.type = (LevelData.PlankType)plankValues.GetValue(i); plankClass.icon = - AssetDatabase.LoadAssetAtPath(string.Format(Constants.PlankPrefabPath, plankClass.type)); + AssetDatabase.LoadAssetAtPath(string.Format(PathConstants.PlankPrefabPath, plankClass.type)); plankTypes.Add(plankClass); } @@ -1667,7 +1667,7 @@ public class LevelEditorWindow : OdinEditorWindow private void InitLevelList() { - var configFilePath = string.Format(Constants.LevelListPath); + var configFilePath = string.Format(PathConstants.LevelListPath); _levelIds = new List(); _levelIds = JsonHelper.LoadJson>(configFilePath); int levelNumber = 1; diff --git a/Forest/Assets/Scripts/Gameplay/Constants.meta b/Forest/Assets/Scripts/Framework/Constants.meta similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Constants.meta rename to Forest/Assets/Scripts/Framework/Constants.meta diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs b/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs similarity index 93% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs rename to Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs index 820a38b..9d59359 100644 --- a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs +++ b/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs @@ -13,10 +13,6 @@ namespace Framework.Constants public const string Chinese = "简体中文"; public const string English = "English"; - //设置本地存档Key - - public const string FirstLaunch = "Launch"; - //BI事件 public const string FteLevelSuccess = "fte_level_success_{0}"; public const string FteLevelEnter = "fte_level_enter_{0}"; @@ -27,8 +23,6 @@ namespace Framework.Constants public const int PopUpLimitNumber = 8; public const int LevelRateIndex = 4; - public const int DefaultUnlockCondition = 100; - /// /// 关卡选择 一页数量 /// diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs.meta b/Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.Level.cs.meta rename to Forest/Assets/Scripts/Framework/Constants/Constants.Level.cs.meta diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs b/Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs similarity index 88% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs rename to Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs index da5c416..f962b01 100644 --- a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs +++ b/Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs @@ -1,10 +1,7 @@ namespace Framework.Constants { - public partial class Constants + public class PathConstants { - //User - public const string EmptyUser = ""; - //新手引导遮罩预制体 public const string GuideMaskObj = "Assets/Art/UI/Prefab/GuideMask.prefab"; @@ -26,9 +23,6 @@ namespace Framework.Constants public const string ItemPrefabPath = "Assets/Art/LevelItem/{0}.prefab"; public const string PlankPrefabPath = "Assets/Art/LevelItem/Plank/{0}.prefab"; - //ChoicePanel Texture - public const string UIChoiceTexturePath = "Assets/Art/Texture/ChoicePanel/{0}.png"; - //Gfx public const string GfxPath = "Assets/Art/Gfx/prefab/{0}.prefab"; diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs.meta b/Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.Path.cs.meta rename to Forest/Assets/Scripts/Framework/Constants/Constants.Path.cs.meta diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs b/Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs rename to Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs diff --git a/Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs.meta b/Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Gameplay/Constants/Constants.UI.cs.meta rename to Forest/Assets/Scripts/Framework/Constants/Constants.UI.cs.meta diff --git a/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs b/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs index e9209db..c35cecf 100644 --- a/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs +++ b/Forest/Assets/Scripts/Framework/Guide/GuideMananger.cs @@ -5,9 +5,9 @@ using UnityEngine; using Framework.UI; using Gameplay.Manager; using Framework.Manager; +using Framework.Constants; using Cysharp.Threading.Tasks; using System.Collections.Generic; -using Constants = Framework.Constants.Constants; public class GuideMananger : Singlenton, IInitable { @@ -96,7 +96,7 @@ public class GuideMananger : Singlenton, IInitable private async UniTask InitGuideMaskUI() { var targetCanvas = UIRoot.Instance.rootMatch; - var obj = await AssetManager.Instance.LoadAssetAsync(Constants.GuideMaskObj); + var obj = await AssetManager.Instance.LoadAssetAsync(PathConstants.GuideMaskObj); _guideMask = Object.Instantiate(obj, targetCanvas.transform); _guideMask.SetActive(false); } @@ -197,7 +197,7 @@ public class GuideMananger : Singlenton, IInitable public void Release() { - AssetManager.Instance.Unload(Constants.GuideMaskObj); + AssetManager.Instance.Unload(PathConstants.GuideMaskObj); } /// diff --git a/Forest/Assets/Scripts/Framework/Login/LoginManager.cs b/Forest/Assets/Scripts/Framework/Login/LoginManager.cs index 51a7111..200c26c 100644 --- a/Forest/Assets/Scripts/Framework/Login/LoginManager.cs +++ b/Forest/Assets/Scripts/Framework/Login/LoginManager.cs @@ -1,16 +1,12 @@ using PhxhSDK; -namespace Gameplay.Login +namespace Framework.Login { public class LoginManager : Singlenton, IInitable { + private LoginStatus[] _mStatusList; - public string Account - { - get => CurrentStatus.GetProfileName(); - } - /// /// 是否登录 /// diff --git a/Forest/Assets/Scripts/Framework/Login/LoginStatus.cs b/Forest/Assets/Scripts/Framework/Login/LoginStatus.cs index 59449d6..f331941 100644 --- a/Forest/Assets/Scripts/Framework/Login/LoginStatus.cs +++ b/Forest/Assets/Scripts/Framework/Login/LoginStatus.cs @@ -1,6 +1,4 @@ -using Framework.Constants; - -namespace Gameplay.Login +namespace Framework.Login { public enum LoginStatusID { @@ -29,7 +27,7 @@ namespace Gameplay.Login public virtual string GetProfileName() { - return Constants.EmptyUser; + return ""; } public virtual void Logout() diff --git a/Forest/Assets/Scripts/Framework/Login/LoginStatusApple.cs b/Forest/Assets/Scripts/Framework/Login/LoginStatusApple.cs index 069125d..447e901 100644 --- a/Forest/Assets/Scripts/Framework/Login/LoginStatusApple.cs +++ b/Forest/Assets/Scripts/Framework/Login/LoginStatusApple.cs @@ -1,84 +1,85 @@ using cfg.BI; using PhxhSDK; using Framework.BI; -using Gameplay.Login; using Framework.Event; -using Constants = Framework.Constants.Constants; -public class LoginStatusApple : LoginStatus +namespace Framework.Login { - public override LoginStatusID ID + public class LoginStatusApple : LoginStatus { - get { return LoginStatusID.Apple; } - } + public override LoginStatusID ID + { + get { return LoginStatusID.Apple; } + } - public override void QuickLogin() - { - DebugUtil.LogWarning("苹果快速登录"); - var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); - var loginService = sdkHelper as ILoginService; - loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); - loginService?.QuickLogin(OnLoginSuccess, OnLoginFail); - } + public override void QuickLogin() + { + DebugUtil.LogWarning("苹果快速登录"); + var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); + var loginService = sdkHelper as ILoginService; + loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); + loginService?.QuickLogin(OnLoginSuccess, OnLoginFail); + } - public override void Login() - { - DebugUtil.LogWarning("苹果登录"); - var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); - var loginService = sdkHelper as ILoginService; - loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); - loginService?.Login(OnLoginSuccess, OnLoginFail); - } + public override void Login() + { + DebugUtil.LogWarning("苹果登录"); + var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); + var loginService = sdkHelper as ILoginService; + loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); + loginService?.Login(OnLoginSuccess, OnLoginFail); + } - public override void Logout() - { - var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); - var loginService = sdkHelper as ILoginService; - loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); - loginService?.Logout(); - } + public override void Logout() + { + var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); + var loginService = sdkHelper as ILoginService; + loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); + loginService?.Logout(); + } - public override string GetProfileName() - { - var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); - var loginService = sdkHelper as ILoginService; - loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); - string profileName = loginService?.GetProfileName(); - DebugUtil.LogWarning("Apple Get UserName: {0}", profileName); - return string.IsNullOrEmpty(profileName) ? Constants.EmptyUser : profileName; - } + public override string GetProfileName() + { + var sdkHelper = SDKManager.Instance.GetSdkHelper(SDKManager.SdkName.FireBase); + var loginService = sdkHelper as ILoginService; + loginService?.SetCurLoginParty(ThirdLoginSDK.AppleSignIn); + string profileName = loginService?.GetProfileName(); + DebugUtil.LogWarning("Apple Get UserName: {0}", profileName); + return string.IsNullOrEmpty(profileName) ? "" : profileName; + } - private void OnLoginSuccess(string userID, string appleUserID, string idToken) - { - LoginManager.Instance.IsLogin = true; - LoginManager.Instance.ShowLogin = true; + private void OnLoginSuccess(string userID, string appleUserID, string idToken) + { + LoginManager.Instance.IsLogin = true; + LoginManager.Instance.ShowLogin = true; - //第三方ID设置为Firebase验证后的唯一id 并存至本地 - AppInfoManager.Instance.ThirdLoginSuccess(userID, LoginStatusID.Apple); + //第三方ID设置为Firebase验证后的唯一id 并存至本地 + AppInfoManager.Instance.ThirdLoginSuccess(userID, LoginStatusID.Apple); - //BI事件 - BIManager.Instance.ThirdID = userID; - BIManager.Instance.TrackEvent(Event.login_success); - BIManager.Instance.TrackEventOnce(EventFirst.fte_login_success); + //BI事件 + BIManager.Instance.ThirdID = userID; + BIManager.Instance.TrackEvent(cfg.BI.Event.login_success); + BIManager.Instance.TrackEventOnce(EventFirst.fte_login_success); - //从服务器获取数据 - GetDataFromSever(); + //从服务器获取数据 + GetDataFromSever(); - //EventManager.Instance.Send(EventManager.EventName.LoginSuccess); - DebugUtil.LogWarning("Apple登录成功:userID: {0}", userID); - } + //EventManager.Instance.Send(EventManager.EventName.LoginSuccess); + DebugUtil.LogWarning("Apple登录成功:userID: {0}", userID); + } - private void GetDataFromSever() - { - AppInfoManager.Instance.CurLoginState = AppInfoManager.NetConfigID.ThirdID; - Forest_AppNetConfig.State = NetRequestStatus.Start; - } + private void GetDataFromSever() + { + AppInfoManager.Instance.CurLoginState = AppInfoManager.NetConfigID.ThirdID; + Forest_AppNetConfig.State = NetRequestStatus.Start; + } - private void OnLoginFail(int code, string msg) - { - LoginManager.Instance.IsLogin = false; - BIManager.Instance.TrackEvent(Event.login_fail, msg); - DebugUtil.LogError("Apple Login Fail: {0}", msg); - EventManager.Instance.Send(EventManager.EventName.LoginFail); + private void OnLoginFail(int code, string msg) + { + LoginManager.Instance.IsLogin = false; + BIManager.Instance.TrackEvent(cfg.BI.Event.login_fail, msg); + DebugUtil.LogError("Apple Login Fail: {0}", msg); + EventManager.Instance.Send(EventManager.EventName.LoginFail); + } } } \ No newline at end of file diff --git a/Forest/Assets/Scripts/Framework/Login/LoginStatusFaceBook.cs b/Forest/Assets/Scripts/Framework/Login/LoginStatusFaceBook.cs index 9193bf1..9de8aa8 100644 --- a/Forest/Assets/Scripts/Framework/Login/LoginStatusFaceBook.cs +++ b/Forest/Assets/Scripts/Framework/Login/LoginStatusFaceBook.cs @@ -2,10 +2,8 @@ using cfg.BI; using PhxhSDK; using Framework.BI; using Framework.Event; -using Event = cfg.BI.Event; -using Constants = Framework.Constants.Constants; -namespace Gameplay.Login +namespace Framework.Login { public class LoginStatusFaceBook : LoginStatus { @@ -38,7 +36,7 @@ namespace Gameplay.Login loginService?.SetCurLoginParty(ThirdLoginSDK.Facebook); string profileName = loginService?.GetProfileName(); DebugUtil.LogWarning("Facebook Get UserName: {0}", profileName); - return string.IsNullOrEmpty(profileName) ? Constants.EmptyUser : profileName; + return string.IsNullOrEmpty(profileName) ? "" : profileName; } private void OnLoginSuccess(string userID, string facebookUserID, string idToken) @@ -50,7 +48,7 @@ namespace Gameplay.Login AppInfoManager.Instance.ThirdLoginSuccess(userID, LoginStatusID.Facebook); BIManager.Instance.ThirdID = userID; - BIManager.Instance.TrackEvent(Event.login_success); + BIManager.Instance.TrackEvent(cfg.BI.Event.login_success); BIManager.Instance.TrackEventOnce(EventFirst.fte_login_success); //从服务器获取数据 @@ -69,7 +67,7 @@ namespace Gameplay.Login private void OnLoginFail(int code, string msg) { LoginManager.Instance.IsLogin = false; - BIManager.Instance.TrackEvent(Event.login_fail, msg); + BIManager.Instance.TrackEvent(cfg.BI.Event.login_fail, msg); DebugUtil.LogError("FaceBook Login Fail: {0}", msg); EventManager.Instance.Send(EventManager.EventName.LoginFail); } diff --git a/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs b/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs index 9750900..2f1a7e7 100644 --- a/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/AppInfoManager.cs @@ -1,6 +1,6 @@ using PhxhSDK; -using Gameplay.Login; using Framework.Event; +using Framework.Login; using Framework.Manager; using LC.Newtonsoft.Json; diff --git a/Forest/Assets/Scripts/Framework/Manager/AudioManager.cs b/Forest/Assets/Scripts/Framework/Manager/AudioManager.cs index fd892de..d238ba3 100644 --- a/Forest/Assets/Scripts/Framework/Manager/AudioManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/AudioManager.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Cysharp.Threading.Tasks; -using Framework.Constants; using UnityEngine; using PhxhSDK; using System; @@ -37,28 +36,28 @@ namespace Framework.Manager try { BGM = await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.MusicPath, "BGM1")); + string.Format(Framework.Constants.PathConstants.MusicPath, "BGM1")); BGMInLevel = await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.MusicPath, "BGM2")); + string.Format(Framework.Constants.PathConstants.MusicPath, "BGM2")); PreLoadAudio("S_Btn", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Btn"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Btn"))); PreLoadAudio("S_Win", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Win"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Win"))); PreLoadAudio("S_Lose", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Lose"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Lose"))); PreLoadAudio("S_Reward", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Reward"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Reward"))); PreLoadAudio("S_AddTime", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_AddTime"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_AddTime"))); PreLoadAudio("S_OpenHole", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_OpenHole"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_OpenHole"))); PreLoadAudio("S_Undo", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Undo"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Undo"))); PreLoadAudio("S_Thumbtack", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_Thumbtack"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_Thumbtack"))); PreLoadAudio("S_PlankDrop", await AssetManager.Instance.LoadAssetAsync( - string.Format(Framework.Constants.Constants.SoundPath, "S_PlankDrop"))); + string.Format(Framework.Constants.PathConstants.SoundPath, "S_PlankDrop"))); } catch (Exception e) { diff --git a/Forest/Assets/Scripts/Framework/Manager/BuildManager.cs b/Forest/Assets/Scripts/Framework/Manager/BuildManager.cs index d569cdf..f13ce02 100644 --- a/Forest/Assets/Scripts/Framework/Manager/BuildManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/BuildManager.cs @@ -397,7 +397,7 @@ namespace Framework.Manager { try { - var path = string.Format(Constants.Constants.BuildBlueprint, _curBuildData.buildID); + var path = string.Format(Constants.PathConstants.BuildBlueprint, _curBuildData.buildID); CurBlueprint = await AssetManager.Instance.LoadAssetAsync(path); } catch (Exception e) diff --git a/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs b/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs index c6c4d5f..7d1b460 100644 --- a/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/EditorTableManager.cs @@ -37,7 +37,7 @@ namespace Framework.Manager public static JSONNode LoadByteBuf(string file) { // todo: load from asset loader - var filePath = string.Format(Constants.Constants.TableDataConfigPath, file); + var filePath = string.Format(Constants.PathConstants.TableDataConfigPath, file); var loadAsset = AssetDatabase.LoadAssetAtPath(filePath); var jsonText = loadAsset.text; return JSON.Parse(jsonText); diff --git a/Forest/Assets/Scripts/Framework/Manager/SettingManager.cs b/Forest/Assets/Scripts/Framework/Manager/SettingManager.cs deleted file mode 100644 index 22af8f0..0000000 --- a/Forest/Assets/Scripts/Framework/Manager/SettingManager.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Framework.Manager; -using Framework.UI; -using UnityEngine; -using PhxhSDK; - -public class SettingData -{ - public float MusicVolume = 1f; - public float SoundVolume = 1f; - - public string Language; -} - -public class SettingManager : Singlenton -{ - private const string SettingKey = "SettingKey"; - private SettingData _settingData; - - public void Init() - { - _settingData = StorageManager.Instance.GetStorage(SettingKey); - _settingData ??= new SettingData(); - - //初始化音量 - AudioManager.Instance.MuteVolume(true); - AudioManager.Instance.SoundVolume = _settingData.SoundVolume; - AudioManager.Instance.MusicVolume = _settingData.MusicVolume; - var muteMusic = Mathf.Approximately(_settingData.MusicVolume, 1f); - var muteSound = Mathf.Approximately(_settingData.SoundVolume, 1f); - AudioManager.Instance.MuteMusic(muteMusic); - AudioManager.Instance.MuteSound(muteSound); - - //初始化语言 - StringManager.Instance.InitLanguage(_settingData.Language); - } - - public void SetMusic(float music) - { - _settingData.MusicVolume = music; - SaveSetting(); - } - - public void SetSound(float sound) - { - _settingData.SoundVolume = sound; - SaveSetting(); - } - - public void SetLanguage(string language) - { - _settingData.Language = language; - SaveSetting(); - } - - private void SaveSetting() - { - StorageManager.Instance.SaveWithoutUpdate(); - } -} \ No newline at end of file diff --git a/Forest/Assets/Scripts/Framework/Manager/TableManager.cs b/Forest/Assets/Scripts/Framework/Manager/TableManager.cs index ddbd8b9..01281a2 100644 --- a/Forest/Assets/Scripts/Framework/Manager/TableManager.cs +++ b/Forest/Assets/Scripts/Framework/Manager/TableManager.cs @@ -29,7 +29,7 @@ namespace Framework private static string _CombinePath(string fileName) { - return string.Format(Constants.Constants.TableDataConfigPath, fileName); + return string.Format(Constants.PathConstants.TableDataConfigPath, fileName); } public async UniTask Load() diff --git a/Forest/Assets/Scripts/Framework/Setting.meta b/Forest/Assets/Scripts/Framework/Setting.meta new file mode 100644 index 0000000..5523215 --- /dev/null +++ b/Forest/Assets/Scripts/Framework/Setting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d4f5d2d875a24e9792649d6b137f2d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Forest/Assets/Scripts/Framework/Setting/SettingManager.cs b/Forest/Assets/Scripts/Framework/Setting/SettingManager.cs new file mode 100644 index 0000000..469bc8e --- /dev/null +++ b/Forest/Assets/Scripts/Framework/Setting/SettingManager.cs @@ -0,0 +1,75 @@ +using Framework.Manager; +using Framework.UI; +using UnityEngine; +using PhxhSDK; + +namespace Framework.Setting +{ + public class SettingData + { + public float MusicVolume = 1f; + public float SoundVolume = 1f; + + public string Language; + + public bool FirstLaunch = true; + } + + public class SettingManager : Singlenton + { + private const string SettingKey = "SettingKey"; + private SettingData _settingData; + + public void Init() + { + _settingData = StorageManager.Instance.GetStorage(SettingKey); + _settingData ??= new SettingData(); + + //初始化音量 + AudioManager.Instance.MuteVolume(true); + AudioManager.Instance.SoundVolume = _settingData.SoundVolume; + AudioManager.Instance.MusicVolume = _settingData.MusicVolume; + var muteMusic = Mathf.Approximately(_settingData.MusicVolume, 1f); + var muteSound = Mathf.Approximately(_settingData.SoundVolume, 1f); + AudioManager.Instance.MuteMusic(muteMusic); + AudioManager.Instance.MuteSound(muteSound); + + //初始化语言 + StringManager.Instance.InitLanguage(_settingData.Language); + } + + public void SetMusic(float music) + { + _settingData.MusicVolume = music; + SaveSetting(); + } + + public void SetSound(float sound) + { + _settingData.SoundVolume = sound; + SaveSetting(); + } + + public void SetLanguage(string language) + { + _settingData.Language = language; + SaveSetting(); + } + + public void SetFirstLaunch() + { + _settingData.FirstLaunch = false; + SaveSetting(); + } + + public bool IsFirstLaunch() + { + return _settingData.FirstLaunch; + } + + private void SaveSetting() + { + StorageManager.Instance.SaveWithoutUpdate(); + } + } +} \ No newline at end of file diff --git a/Forest/Assets/Scripts/Framework/Manager/SettingManager.cs.meta b/Forest/Assets/Scripts/Framework/Setting/SettingManager.cs.meta similarity index 100% rename from Forest/Assets/Scripts/Framework/Manager/SettingManager.cs.meta rename to Forest/Assets/Scripts/Framework/Setting/SettingManager.cs.meta diff --git a/Forest/Assets/Scripts/Framework/UI/UIRoot.cs b/Forest/Assets/Scripts/Framework/UI/UIRoot.cs index 953bfae..ca90960 100644 --- a/Forest/Assets/Scripts/Framework/UI/UIRoot.cs +++ b/Forest/Assets/Scripts/Framework/UI/UIRoot.cs @@ -132,7 +132,7 @@ namespace Framework.UI { try { - var path = string.Format(Constants.Constants.UIPrefabPath, windowName); + var path = string.Format(Constants.PathConstants.UIPrefabPath, windowName); var uiPrefab = await AssetManager.Instance.LoadAssetAsync(path); return uiPrefab; } diff --git a/Forest/Assets/Scripts/Gameplay/ForestLevel/KongManager.cs b/Forest/Assets/Scripts/Gameplay/ForestLevel/KongManager.cs index eb4223d..1a992d5 100644 --- a/Forest/Assets/Scripts/Gameplay/ForestLevel/KongManager.cs +++ b/Forest/Assets/Scripts/Gameplay/ForestLevel/KongManager.cs @@ -92,7 +92,7 @@ namespace Gameplay.ForestLevel { try { - var path = string.Format(Framework.Constants.Constants.ItemPrefabPath, itemName); + var path = string.Format(Framework.Constants.PathConstants.ItemPrefabPath, itemName); var item = await AssetManager.Instance.LoadAssetAsync(path); return item; } diff --git a/Forest/Assets/Scripts/Gameplay/ForestLevel/Level.cs b/Forest/Assets/Scripts/Gameplay/ForestLevel/Level.cs index 16e78a9..788a127 100644 --- a/Forest/Assets/Scripts/Gameplay/ForestLevel/Level.cs +++ b/Forest/Assets/Scripts/Gameplay/ForestLevel/Level.cs @@ -3,9 +3,9 @@ using PhxhSDK.Phxh; using Framework.BI; using Gameplay.Manager; using LC.Newtonsoft.Json; -using Cysharp.Threading.Tasks; +using Framework.Constants; using Gameplay.ForestLevel; -using Constants = Framework.Constants.Constants; +using Cysharp.Threading.Tasks; namespace Gameplay.Level { @@ -34,7 +34,7 @@ namespace Gameplay.Level private async UniTask LoadLevelConfig(string levelID) { - var configFilePath = string.Format(Constants.LevelConfigPath, levelID); + var configFilePath = string.Format(PathConstants.LevelConfigPath, levelID); _levelData = await JsonHelper.LoadFromAddressable(configFilePath); } diff --git a/Forest/Assets/Scripts/Gameplay/ForestLevel/PlankManager.cs b/Forest/Assets/Scripts/Gameplay/ForestLevel/PlankManager.cs index 715ae40..56641f1 100644 --- a/Forest/Assets/Scripts/Gameplay/ForestLevel/PlankManager.cs +++ b/Forest/Assets/Scripts/Gameplay/ForestLevel/PlankManager.cs @@ -21,7 +21,7 @@ namespace Gameplay.ForestLevel private LevelData _planksLevelData; private static readonly string HoleOfPlankPath = - string.Format(Framework.Constants.Constants.ItemPrefabPath, "HoleOfPlank"); + string.Format(Framework.Constants.PathConstants.ItemPrefabPath, "HoleOfPlank"); public async UniTask PreLoadLevelItem() { @@ -34,7 +34,7 @@ namespace Gameplay.ForestLevel var index = plankIndex[i]; var plankName = LevelUtils.GetPlankName(_planksLevelData.planksType[index], _planksLevelData.squareType[index]); - var plankPath = string.Format(Framework.Constants.Constants.PlankPrefabPath, plankName); + var plankPath = string.Format(Framework.Constants.PathConstants.PlankPrefabPath, plankName); var myPlank = await AssetManager.Instance.LoadAssetAsync(plankPath); var pos = LevelUtils.GetPlankPositionInfo(KongManager.Instance.HoleDic, _planksLevelData.HolesOfPlanksIndex[index], _planksLevelData.planksType[index], diff --git a/Forest/Assets/Scripts/Gameplay/Game/MyGame.cs b/Forest/Assets/Scripts/Gameplay/Game/MyGame.cs index 429cddd..6413fdd 100644 --- a/Forest/Assets/Scripts/Gameplay/Game/MyGame.cs +++ b/Forest/Assets/Scripts/Gameplay/Game/MyGame.cs @@ -2,7 +2,7 @@ using PhxhSDK; using Framework.UI; using Framework.BI; using Gameplay.Game; -using Gameplay.Login; +using Framework.Login; using Gameplay.Manager; using Framework.Manager; using Gameplay.LoadingExecutor; diff --git a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs index 239c03d..23d4595 100644 --- a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs +++ b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs @@ -1,13 +1,13 @@ using cfg.BI; using PhxhSDK; using Framework; -using UnityEngine; using Framework.BI; using Framework.UI; using PhxhSDK.Phxh; -using Gameplay.Login; +using Framework.Login; using Framework.Event; using Gameplay.Manager; +using Framework.Setting; using Framework.Manager; using Framework.Constants; using Cysharp.Threading.Tasks; @@ -72,8 +72,8 @@ namespace Gameplay.LoadingExecutor } var buildId = buildInfo.BuildData; - var buildPath = string.Format(Framework.Constants.Constants.SceneBuildPath, buildId); - var buildConfig = string.Format(Framework.Constants.Constants.BuildConfigPath, buildId); + var buildPath = string.Format(Framework.Constants.PathConstants.SceneBuildPath, buildId); + var buildConfig = string.Format(Framework.Constants.PathConstants.BuildConfigPath, buildId); var buildData = await JsonHelper.LoadFromAddressable(buildConfig); var reachCondition = LevelSelectManager.Instance.CurPassLevelIndex; if (GuideMananger.Instance.IsGuiding && !string.IsNullOrEmpty(GuideMananger.Instance.PassLevelID)) @@ -106,11 +106,12 @@ namespace Gameplay.LoadingExecutor if (AppInfoManager.Instance.UpdateConfirm && !GuideMananger.Instance.IsGuiding) await UIManager.Instance.OpenWindow(UIConstants.UISyncTip); #if UNITY_IOS - if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin && !GuideMananger.Instance.IsGuiding) + if (!AppInfoManager.Instance.CheckIfLogin() && !LoginManager.Instance.ShowLogin && + !GuideMananger.Instance.IsGuiding) await UIManager.Instance.OpenWindow(UIConstants.UILogin); #endif - if (!PlayerPrefs.HasKey(LevelConstants.FirstLaunch)) + if (SettingManager.Instance.IsFirstLaunch()) { await UIManager.Instance.OpenWindow(UIConstants.UIUserAgreement); } diff --git a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/LevelLoadingExecutor.cs b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/LevelLoadingExecutor.cs index 23c2719..0bf9280 100644 --- a/Forest/Assets/Scripts/Gameplay/LoadingExecutor/LevelLoadingExecutor.cs +++ b/Forest/Assets/Scripts/Gameplay/LoadingExecutor/LevelLoadingExecutor.cs @@ -8,7 +8,6 @@ using Cysharp.Threading.Tasks; using Gameplay.ForestLevel; using UnityEngine.SceneManagement; using UnityEngine.AddressableAssets; -using Constants = Framework.Constants.Constants; namespace Gameplay.LoadingExecutor { @@ -18,7 +17,7 @@ namespace Gameplay.LoadingExecutor protected override async UniTask _DoLoading() { - await Addressables.LoadSceneAsync(Constants.SceneLevelPath, LoadSceneMode.Single).ToUniTask(); + await Addressables.LoadSceneAsync(PathConstants.SceneLevelPath, LoadSceneMode.Single).ToUniTask(); _destProgress = 10f; await LevelManager.Instance.LoadLevel(_levelID); _destProgress = 20f; diff --git a/Forest/Assets/Scripts/Gameplay/Manager/GfxManager.cs b/Forest/Assets/Scripts/Gameplay/Manager/GfxManager.cs index c16fcb3..49be9f2 100644 --- a/Forest/Assets/Scripts/Gameplay/Manager/GfxManager.cs +++ b/Forest/Assets/Scripts/Gameplay/Manager/GfxManager.cs @@ -3,9 +3,9 @@ using PhxhSDK; using UnityEngine; using Framework.UI; using System.Collections; +using Framework.Constants; using Cysharp.Threading.Tasks; using System.Collections.Generic; -using Constants = Framework.Constants.Constants; public class GfxManager : SingletonMono, IInitable { @@ -71,7 +71,7 @@ public class GfxManager : SingletonMono, IInitable if (!gfxDic.ContainsKey(gfxName)) { - var gfx = await AssetManager.Instance.LoadAssetAsync(string.Format(Constants.GfxPath, + var gfx = await AssetManager.Instance.LoadAssetAsync(string.Format(PathConstants.GfxPath, gfxName)); var root = inUI ? UIRoot.Instance.root.transform : UIRoot.Instance.rootGfx.transform; var gfxObj = Instantiate(gfx, root); @@ -150,7 +150,7 @@ public class GfxManager : SingletonMono, IInitable { if (gfxDic.TryGetValue(gfxName, out var gfx)) { - AssetManager.Instance.Unload(string.Format(Constants.GfxPath, gfxName)); + AssetManager.Instance.Unload(string.Format(PathConstants.GfxPath, gfxName)); } } diff --git a/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs b/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs index 22a8371..f7862b2 100644 --- a/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs +++ b/Forest/Assets/Scripts/Gameplay/Manager/LevelSelectManager.cs @@ -8,7 +8,6 @@ using Framework.Manager; using Framework.Constants; using Cysharp.Threading.Tasks; using System.Collections.Generic; -using Constants = Framework.Constants.Constants; namespace Gameplay.Manager { @@ -43,7 +42,7 @@ namespace Gameplay.Manager { try { - var configFilePath = string.Format(Constants.LevelListPath); + var configFilePath = string.Format(PathConstants.LevelListPath); _allLevels = await JsonHelper.LoadFromAddressable>(configFilePath); } catch (Exception e) diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs index 2c13bf1..a6c3265 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UILoginPanelController.cs @@ -3,7 +3,7 @@ using UnityEngine; using Framework.UI; using Framework.BI; using UnityEngine.UI; -using Gameplay.Login; +using Framework.Login; using Framework.Event; using Gameplay.Manager; using Framework.Manager; diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UIScoreController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UIScoreController.cs index eae6c9e..88472ed 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UIScoreController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UIScoreController.cs @@ -18,7 +18,7 @@ public class UIScoreController : UIWindow private void GoToScore() { - var url = Application.platform == RuntimePlatform.Android ? Constants.ScoreUrlAndroid : Constants.ScoreUrlIOS; + var url = Application.platform == RuntimePlatform.Android ? PathConstants.ScoreUrlAndroid : PathConstants.ScoreUrlIOS; Application.OpenURL(url); UnityEngine.PlayerPrefs.SetInt(LevelConstants.PopUpToScore, 1); CloseWindow(); diff --git a/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs b/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs index 7e3664a..4667186 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/Other/UIUserAgreementController.cs @@ -3,6 +3,7 @@ using Framework.BI; using Framework.UI; using UnityEngine.UI; using Framework.Event; +using Framework.Setting; using Framework.Constants; public class UIUserAgreementController : UIWindow @@ -29,14 +30,13 @@ public class UIUserAgreementController : UIWindow private void OpenURL() { - Application.OpenURL(Constants.AgreementUrl); + Application.OpenURL(PathConstants.AgreementUrl); } private void OnAgree() { CloseWindow(true); - - PlayerPrefs.SetInt(LevelConstants.FirstLaunch, 1); + SettingManager.Instance.SetFirstLaunch(); BIManager.Instance.TrackEventOnce(cfg.BI.EventFirst.fte_privacy_agree); } } \ No newline at end of file diff --git a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs index 2a8eaec..3fc0770 100644 --- a/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs +++ b/Forest/Assets/Scripts/Gameplay/UI/StartPanel/UISettingPanelController.cs @@ -4,10 +4,11 @@ using cfg.BI; using UnityEngine; using Framework.UI; using Framework.BI; -using Gameplay.Login; using UnityEngine.UI; using Framework.Event; +using Framework.Login; using Framework.Manager; +using Framework.Setting; using Framework.Constants; using Event = cfg.BI.Event;