Main/Config/ConfigBase.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Config/ConfigManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Core/GameEngine/Launch/InitSettingTask.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Core/GameEngine/Launch/LaunchInHot.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/ClientVersion/RequestSecretWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Language/Language.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Launch/LaunchWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Launch/LoadingWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Login/GameAgeWarnWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Login/LoginManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Login/LoginWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Sound/SoundPlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/UIBase/UIBase.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/Config/ConfigBase.cs
@@ -59,8 +59,6 @@ { dic.Clear(); Dictionary<string, string> rawDatas = new Dictionary<string, string>(); for (int i = 3; i < lines.Length; i++) { string line = lines[i]; Main/Config/ConfigManager.cs
@@ -54,7 +54,7 @@ typeof(GmCmdConfig), typeof(GuideConfig), typeof(IconConfig), typeof(InitialFunctionConfig), //typeof(InitialFunctionConfig), typeof(ItemConfig), typeof(KickOutReasonConfig), typeof(LanguageConfig), @@ -68,7 +68,7 @@ typeof(PlayerFaceStarConfig), typeof(PlayerLVConfig), typeof(priorbundleConfig), typeof(PriorLanguageConfig), //typeof(PriorLanguageConfig), typeof(RichTextMsgReplaceConfig), typeof(RuleConfig), typeof(SkillConfig), Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs
@@ -37,16 +37,18 @@ if (!firstLaunch) { LoadInitalConfig().Forget(); //LoadInitalConfig().Forget(); done = true; } } protected async UniTask LoadInitalConfig() { await ConfigManager.Instance.LoadConfigByType(typeof(InitialFunctionConfig)); //应该是下载最新的表格后再次加载 非拷贝 //protected async UniTask LoadInitalConfig() //{ // await ConfigManager.Instance.LoadConfigByType(typeof(InitialFunctionConfig)); done = true; } // done = true; //} public override void End() { Main/Core/GameEngine/Launch/InitSettingTask.cs
@@ -14,7 +14,7 @@ { ShaderUtility.InitGlobalParams(); SoundPlayer.CreateSoundPlayer(); SoundPlayer.Instance.PlayLoginMusic(); //SoundPlayer.Instance.PlayLoginMusic(); SystemSetting.Instance.SetSoundVolume(SystemSetting.Instance.GetSoundVolume()); SystemSetting.Instance.SetSoundEffect(SystemSetting.Instance.GetSoundEffect()); Main/Core/GameEngine/Launch/LaunchInHot.cs
@@ -26,11 +26,12 @@ Application.backgroundLoadingPriority = ThreadPriority.High; Screen.sleepTimeout = SleepTimeout.NeverSleep; InitSystemMgr(); SDKUtils.Instance.Init(); //原sdk接口 // 这里还没开始加载配置 但是提前加载了供LaunchWin使用 LanguageConfig.ForceInit(); InitSystemMgr(); SDKUtils.Instance.Init(); //原sdk接口 // 这里还没开始加载配置 但是提前加载了供LaunchWin使用 PriorLanguageConfig.ForceInit(); InitialFunctionConfig.ForceInit(); UIManager.Instance.OpenWindow<LaunchWin>(); Main/System/ClientVersion/RequestSecretWin.cs
@@ -30,10 +30,12 @@ #endif }); m_Fuwu.SetListener(()=> { UIManager.Instance.OpenWindow<GameAgeWarnWin>().SetFunctionOrder(1); GameAgeWarnWin.data = 1; UIManager.Instance.OpenWindow<GameAgeWarnWin>(); }); m_Yinsi.SetListener(() => { UIManager.Instance.OpenWindow<GameAgeWarnWin>().SetFunctionOrder(2); GameAgeWarnWin.data = 2; UIManager.Instance.OpenWindow<GameAgeWarnWin>(); }); } Main/System/Language/Language.cs
@@ -97,7 +97,7 @@ // if (_id.StartsWith(NewBieGuideScriptableObject.GuidesPrefixNewBie) || // _id.StartsWith(NewBieGuideScriptableObject.GuidesPrefixFun)) // return string.Empty; // Debug.LogFormat("缺少语言表配置,id: {0}", _id); Debug.LogErrorFormat("缺少语言表配置,id: {0}", _id); #endif return string.Empty; } Main/System/Launch/LaunchWin.cs
@@ -118,8 +118,9 @@ else { m_AndroidProgressContainer.SetActive(true); m_IosProgressContainer.SetActive(false); m_Version.text = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, Language.Id); m_IosProgressContainer.SetActive(false); //打包版本 + 功能版本 + 语言ID m_Version.text = LoginManager.Instance.GetVersionStr(); } if (m_StageDescription != null) Main/System/Launch/LoadingWin.cs
@@ -59,7 +59,9 @@ { base.OnPreOpen(); currentProgress = targetProgress = 0; Refresh(); Refresh(); //打包版本 + 功能版本 + 语言ID m_Version.text = LoginManager.Instance.GetVersionStr(); } protected override void OnPreClose() Main/System/Login/GameAgeWarnWin.cs
@@ -15,47 +15,27 @@ [SerializeField] Transform m_Title3; //年龄 [SerializeField] Transform m_Info3; [SerializeField] Button m_Close; // 生命周期 protected override void Awake() { base.Awake(); // 初始化组件引用 public static int data = 1; protected override void InitComponent() { m_Close.AddListener(CloseWindow); } protected override void Start() { base.Start(); // 初始化数据 } // UI事件 protected override void OnOpen() { base.OnOpen(); // 窗口打开时的逻辑 // m_Title1.SetActive(functionOrder == 1); // m_Info1.SetActive(functionOrder == 1); // m_Title2.SetActive(functionOrder == 2); // m_Info2.SetActive(functionOrder == 2); // m_Title3.SetActive(functionOrder == 3); // m_Info3.SetActive(functionOrder == 3); m_Title1.SetActive(data == 1); m_Info1.SetActive(data == 1); m_Title2.SetActive(data == 2); m_Info2.SetActive(data == 2); m_Title3.SetActive(data == 3); m_Info3.SetActive(data == 3); } protected override void OnClose() { base.OnClose(); // 窗口关闭时的逻辑 } public override void Refresh() { base.Refresh(); // 刷新UI显示 } public void SetFunctionOrder(int _functionOrder) { } } Main/System/Login/LoginManager.cs
@@ -294,72 +294,77 @@ } public C0101_tagCPlayerLogin Get0101SendPackage(H0101_tagServerPrepared _serverInfo) { var send = new C0101_tagCPlayerLogin(); switch (VersionConfig.Get().versionAuthority) { var send = new C0101_tagCPlayerLogin(); switch (VersionConfig.Get().versionAuthority) { case VersionAuthority.InterTest: send.IDType = 1; send.AccID = accountBuf; if (sdkLoginResult == null) send.Password = "111"; else send.Password = sdkLoginResult.token; send.MAC = DeviceUtility.GetMac(); send.Version = _serverInfo.Version; send.LineNO = 255; send.AppID = VersionConfig.Get().appId; send.AccountID = 1000;// 内部登陆的时候的id send.TokenExpire = "1519750743000";// 内部登陆的时长,无所谓的 send.Phone = 0; send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag; send.Adult = 1; send.ExtraLen = 0; send.Extra = ""; break; case VersionAuthority.Release: { var deviceInfo = DeviceUtility.GetDeviceModel(); deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", ""); var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo); send.Extra = StringUtility.Contact(VersionConfig.Get().SpID, "|", SDKUtils.Instance.Device.uniqueID, "|", sdkLoginResult.token, "|", sdkLoginResult.qkUserName, "|", versionStr.Substring(0, Math.Min(24, versionStr.Length))); Debug.Log("=====> extra: " + send.Extra); send.ExtraLen = (ushort)send.Extra.Length; send.IDType = (byte)SDKUtils.Instance.ChannelPlatform; case VersionAuthority.InterTest: send.IDType = 1; send.AccID = accountBuf; if (sdkLoginResult == null) send.Password = "111"; else send.Password = sdkLoginResult.token; send.AccID = sdkLoginResult.account; send.MAC = DeviceUtility.GetMac(); send.Version = _serverInfo.Version; send.LineNO = 255; send.AppID = VersionConfig.Get().appId; send.AccountID = (uint)sdkLoginResult.accountID; send.TokenExpire = sdkLoginResult.tokenExpire; send.Phone = (byte)sdkLoginResult.phone; send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag; if (sdkIDCheckIDAuthentication.type == "1") { send.Adult = 1; } else if (sdkIDCheckIDAuthentication.type == "2") { send.Adult = MathUtility.CheckAdult(sdkIDCheckIDAuthentication.card_id) ? (byte)1 : (byte)0; } else { send.Adult = 0; } break; } } return send; send.MAC = DeviceUtility.GetMac(); send.Version = _serverInfo.Version; send.LineNO = 255; send.AppID = VersionConfig.Get().appId; send.AccountID = 1000;// 内部登陆的时候的id send.TokenExpire = "1519750743000";// 内部登陆的时长,无所谓的 send.Phone = 0; send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag; send.Adult = 1; send.ExtraLen = 0; send.Extra = ""; break; case VersionAuthority.Release: { var deviceInfo = DeviceUtility.GetDeviceModel(); deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", ""); var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo); send.Extra = StringUtility.Contact(VersionConfig.Get().SpID, "|", SDKUtils.Instance.Device.uniqueID, "|", sdkLoginResult.token, "|", sdkLoginResult.qkUserName, "|", versionStr.Substring(0, Math.Min(24, versionStr.Length))); Debug.Log("=====> extra: " + send.Extra); send.ExtraLen = (ushort)send.Extra.Length; send.IDType = (byte)SDKUtils.Instance.ChannelPlatform; send.Password = sdkLoginResult.token; send.AccID = sdkLoginResult.account; send.MAC = DeviceUtility.GetMac(); send.Version = _serverInfo.Version; send.LineNO = 255; send.AppID = VersionConfig.Get().appId; send.AccountID = (uint)sdkLoginResult.accountID; send.TokenExpire = sdkLoginResult.tokenExpire; send.Phone = (byte)sdkLoginResult.phone; send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag; if (sdkIDCheckIDAuthentication.type == "1") { send.Adult = 1; } else if (sdkIDCheckIDAuthentication.type == "2") { send.Adult = MathUtility.CheckAdult(sdkIDCheckIDAuthentication.card_id) ? (byte)1 : (byte)0; } else { send.Adult = 0; } break; } } return send; } public string GetVersionStr() { return StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", InitialFunctionConfig.Get("version").Numerical1); } } Main/System/Login/LoginWin.cs
@@ -64,18 +64,17 @@ 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>(); }); } @@ -125,12 +124,10 @@ public override void Refresh() { base.Refresh(); Debug.Log("刷新登录窗口"); // 版本信息 string strVersion = StringUtility.Contact("ver ", InitialFunctionConfig.Get("version").Numerical1); verInfo.text = strVersion; Debug.Log("刷新登录窗口"); //打包版本 + 功能版本 + 语言ID verInfo.text = LoginManager.Instance.GetVersionStr(); var sprite = BuiltInLoader.LoadSprite("TB_DL_Logo"); m_Logo.overrideSprite = sprite; Main/System/Sound/SoundPlayer.cs
@@ -302,23 +302,23 @@ } } public void PlayLoginMusic() { var loginMusic = BuiltInLoader.LoadMusic("Music_Login"); if (!m_MusicAudioSource.isPlaying || m_MusicAudioSource.clip != loginMusic) { StartCoroutine(Co_BackGroundMusicFadeOutIn(loginMusic, false)); } } //public void PlayLoginMusic() //{ // var loginMusic = BuiltInLoader.LoadMusic("Music_Login"); // if (!m_MusicAudioSource.isPlaying || m_MusicAudioSource.clip != loginMusic) // { // StartCoroutine(Co_BackGroundMusicFadeOutIn(loginMusic, false)); // } //} private void LateUpdate() { // if (CameraController.Instance != null && CameraController.Instance.CameraObject != null) // { // this.transform.position = CameraController.Instance.transform.position + new Vector3(0, 5, 0); // this.transform.rotation = CameraController.Instance.CameraObject.transform.rotation; // } } //private void LateUpdate() //{ // if (CameraController.Instance != null && CameraController.Instance.CameraObject != null) // { // this.transform.position = CameraController.Instance.transform.position + new Vector3(0, 5, 0); // this.transform.rotation = CameraController.Instance.CameraObject.transform.rotation; // } //} IEnumerator Co_BackGroundMusicFadeOutIn(AudioClip _clip, bool _oneShot) { Main/System/UIBase/UIBase.cs
@@ -79,7 +79,7 @@ // 组件引用 protected Canvas canvas; protected CanvasGroup canvasGroup; protected RectTransform _rectTransform; protected RectTransform _rectTransform; //界面默认添加根节点用于表现界面开启关闭动画 // 动画相关 protected Vector3 originalPosition; @@ -118,6 +118,9 @@ private void CreateRootNode() { if (openAnimationType == UIAnimationType.None && closeAnimationType == UIAnimationType.None) return; List<Transform> children = new List<Transform>(); foreach (Transform child in transform) { @@ -127,13 +130,14 @@ rootNode = new GameObject("WindowRoot"); rootNode.transform.SetParent(transform, false); rootNode.layer = LayerMask.NameToLayer("UI"); _rectTransform = rootNode.AddMissingComponent<RectTransform>(); _rectTransform.anchorMin = new Vector2(0.5f, 0.5f); _rectTransform.anchorMax = new Vector2(0.5f, 0.5f); _rectTransform = rootNode.AddMissingComponent<RectTransform>(); //设置成拉伸效果,和父容器保持同样大小自动适配 _rectTransform.anchorMin = Vector2.zero; _rectTransform.anchorMax = Vector2.one; _rectTransform.pivot = new Vector2(0.5f, 0.5f); _rectTransform.sizeDelta = new Vector2(750, 1334); // 默认大小,可以根据需要调整 _rectTransform.anchoredPosition = Vector2.zero; _rectTransform.localScale = Vector3.one; _rectTransform.sizeDelta = Vector2.zero; // 设置为0,表示拉伸到父容器大小 foreach (Transform child in children) { @@ -147,21 +151,21 @@ } protected async UniTask ApplySettings() { await UniTask.DelayFrame(5); if (null != transform) { if (clickEmptySpaceClose) { if (clickEmptySpaceClose) { GameObject goBtnESC = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/ClickEmptyCloseMask"), transform); // Load btnClickEmptyClose = goBtnESC.GetComponent<Button>(); btnClickEmptyClose.AddListener(CloseWindow); btnClickEmptyClose.transform.SetAsFirstSibling(); } //延迟创建会导致层级在ScreenMask之上 GameObject goBtnESC = GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/ClickEmptyCloseMask"), transform); btnClickEmptyClose = goBtnESC.GetComponent<Button>(); btnClickEmptyClose.AddListener(CloseWindow); btnClickEmptyClose.transform.SetAsFirstSibling(); await UniTask.DelayFrame(5); btnClickEmptyClose = goBtnESC.GetComponent<Button>(); btnClickEmptyClose.AddListener(CloseWindow); } } protected async void ExecuteNextFrame(Action _action) { @@ -663,8 +667,8 @@ if (canvasGroup != null) { canvasGroup.alpha = 1f; canvasGroup.interactable = false; canvasGroup.blocksRaycasts = false; canvasGroup.interactable = true; canvasGroup.blocksRaycasts = true; } if (canvasScaler != null) {