From 5af0b828745e9db4fd9eb599c9aa2761338d16ef Mon Sep 17 00:00:00 2001 From: LuoFang Date: Fri, 24 Nov 2023 12:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Art/UI/Texture/SDKLogin/TapTap-60.png | 3 + .../UI/Texture/SDKLogin/TapTap-60.png.meta | 153 ++++++++++++ .../Scripts/Framework/UI/UIManager.Window.cs | 9 + .../GameStartLoadingExecutor.cs | 8 +- .../LoadingExecutorWithUILoadingController.cs | 6 +- .../Scripts/Gameplay/UI/LoadingUILocalize.cs | 88 +++++++ .../Gameplay/UI/LoadingUILocalize.cs.meta | 11 + .../Gameplay/UI/UIBinder/UI_LoadingBinder.cs | 34 +++ .../UI/UIBinder/UI_LoadingBinder.cs.meta | 11 + .../Gameplay/UI/UIBinder/UI_LogInBinder.cs | 77 ++++++ .../UI/UIBinder/UI_LogInBinder.cs.meta | 11 + .../UI/UIBinder/UI_LoginTipsBinder.cs | 50 ++++ .../UI/UIBinder/UI_LoginTipsBinder.cs.meta | 11 + .../Gameplay/UI/UI_LoadingController.cs | 145 ++++++++++++ .../Gameplay/UI/UI_LoadingController.cs.meta | 11 + .../Scripts/Gameplay/UI/UI_LogInController.cs | 224 ++++++++++++++++++ .../Gameplay/UI/UI_LogInController.cs.meta | 11 + .../Gameplay/UI/UI_LoginTipsController.cs | 72 ++++++ .../UI/UI_LoginTipsController.cs.meta | 11 + .../Scripts/Gameplay/Utils/CommonUtils.cs | 6 + .../Config/Data/skillcfg_skillconfig.json | 48 ++++ .../Data/storycfg_motionmapperconfig.json | 16 ++ .../Config/Data/stringCfgLoadingUI.json | 8 + .../Config/Data/stringCfgLoadingUI.json.meta | 7 + .../Config/Data/stringcfg_stringconfig.json | 24 ++ .../Assets/Config/UISomeAbout/LoadingUI.meta | 8 + 26 files changed, 1056 insertions(+), 7 deletions(-) create mode 100644 ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png create mode 100644 ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LogInBinder.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LogInBinder.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoginTipsBinder.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoginTipsBinder.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LoadingController.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LoadingController.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LogInController.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LogInController.cs.meta create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LoginTipsController.cs create mode 100644 ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UI_LoginTipsController.cs.meta create mode 100644 ProjectNLD/Assets/Config/Data/stringCfgLoadingUI.json create mode 100644 ProjectNLD/Assets/Config/Data/stringCfgLoadingUI.json.meta create mode 100644 ProjectNLD/Assets/Config/UISomeAbout/LoadingUI.meta diff --git a/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png b/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png new file mode 100644 index 00000000000..4e76118ef1a --- /dev/null +++ b/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ed449d84f05abc85f732d5589527ecc202664f96c7871c0c0eb4ed83c099cb6 +size 3924 diff --git a/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png.meta b/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png.meta new file mode 100644 index 00000000000..4ebbc24430b --- /dev/null +++ b/ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png.meta @@ -0,0 +1,153 @@ +fileFormatVersion: 2 +guid: 6d480d692d319e2439316f3fe993ef96 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs b/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs index f5c7aa14fb1..d54b42fd431 100644 --- a/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs +++ b/ProjectNLD/Assets/Code/Scripts/Framework/UI/UIManager.Window.cs @@ -52,6 +52,9 @@ public partial class UIManager _WindowMeta(UINameConst.UI_VehicleCultivate, UIWindowLayer.Normal); _WindowMeta(UINameConst.UI_VehicleLevelUp, UIWindowLayer.Normal); _WindowMeta(UINameConst.UI_Update, UIWindowLayer.Max); + _WindowMeta(UINameConst.UI_LogIn, UIWindowLayer.Max); + _WindowMeta(UINameConst.UI_LoginTips, UIWindowLayer.Max); + _WindowMeta(UINameConst.UI_Loading, UIWindowLayer.Max); } @@ -121,4 +124,10 @@ public static class UINameConst public static readonly string UI_VehicleLevelUp = "MainScene/VehicleCultivate/UI_VehicleLevelUp"; public static readonly string UI_Update = "Interface/UI_Update"; + public static readonly string UI_LogIn = "StartScene/New/UI_LogIn"; + + public static readonly string UI_LoginTips = "StartScene/New/UI_LoginTips"; + public static readonly string UI_Loading = "StartScene/New/UI_Loading"; + + } \ No newline at end of file diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs index 3d6d7f2be89..feab40f98cc 100644 --- a/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/GameStartLoadingExecutor.cs @@ -11,7 +11,7 @@ namespace Gameplay { public class GameStartLoadingExecutor : LoadingExecutorWithUILoadingController { - private UILoadingController _uiLoadingController; + private UI_LoadingController _uiLoadingController; private bool _needUpdate; @@ -47,10 +47,10 @@ namespace Gameplay private async UniTask LoadLoginUI() { - await UIManager.Instance.LoadWindow(UINameConst.UINewLogin); + await UIManager.Instance.LoadWindow(UINameConst.UI_LogIn); } - protected override void _OnEnd() + protected override async void _OnEnd() { if (_needUpdate) { @@ -62,7 +62,7 @@ namespace Gameplay } else { - UIManager.Instance.OpenWindow(UINameConst.UINewLogin); + await UIManager.Instance.OpenWindow(UINameConst.UI_LogIn); } } diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/LoadingExecutorWithUILoadingController.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/LoadingExecutorWithUILoadingController.cs index a64ff3e156d..881480cbd51 100644 --- a/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/LoadingExecutorWithUILoadingController.cs +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/LoadingExecutor/LoadingExecutorWithUILoadingController.cs @@ -1,13 +1,13 @@ -using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks; namespace Gameplay { public abstract class LoadingExecutorWithUILoadingController : LoadingExecutor { - private UILoadingController _uiLoadingController; + private UI_LoadingController _uiLoadingController; public override async void OnExecute() { - _uiLoadingController = await UIManager.Instance.OpenWindow(UINameConst.UILoading) as UILoadingController; + _uiLoadingController = await UIManager.Instance.OpenWindow(UINameConst.UI_Loading) as UI_LoadingController; if (_uiLoadingController != null) { diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs new file mode 100644 index 00000000000..42389abfac9 --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs @@ -0,0 +1,88 @@ +using cfg.StringCfg; +using Cysharp.Threading.Tasks; +using Framework; +using PhxhSDK; +using SimpleJSON; +using UnityEditor; +using UnityEngine; +using static StringManager; +namespace Gameplay +{ + class LoadingUILocalize : Singlenton + { + public StringConfig Config => cfg; + StringConfig cfg; + + private async UniTask LoadByteBuf(string file) + { + DebugUtil.LogY("TableManager LoadByteBuf {0}", file); + // todo: load from asset loader + var filePath = string.Format("Assets/Config/Data/stringCfgLoadingUI.json"); + //var loadAsset = AssetDatabase.LoadAssetAtPath(filePath); + var loadAsset = await AssetManager.Instance.LoadAssetAsync(filePath); + var jsonText = loadAsset.text; + return JSON.Parse(jsonText); + } + private async UniTask LoadCfg() + { + cfg = new cfg.StringCfg.StringConfig(await LoadByteBuf("stringcfg_stringconfigUILoading")); + + } + public async UniTask Init() + { + await LoadCfg(); + } + private DataString GetByKey(string key) + { + var dataString = cfg.GetOrDefault(key); + if (dataString == null || string.IsNullOrEmpty(dataString.Value)) + { + DebugUtil.LogError("{0}.GetStringConfigByKey: key = {1} is not exist, check table please!!", GetType(), key); + } + return dataString; + } + + public string GetTextByIndex(int index) + { + + DataString data = cfg.DataList[index]; + string value = ""; + if (data != null) + { + switch (StringManager.CurLanguage) + { + case (LanguageType.Default): + { + value = data.Value; + break; + } + case (LanguageType.CN): + { + value = data.Value; + break; + } + case (LanguageType.TW): + { + break; + } + case (LanguageType.EN): + { + value = data.ValueEn; + break; + } + default: + { + DebugUtil.LogError($"==== 文本翻译的语言不存在相应的枚举值!请检查语言设置!!! ===="); + break; + } + + } + + + } + return value; + } + } +} + + diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs.meta b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs.meta new file mode 100644 index 00000000000..385971b10f9 --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/LoadingUILocalize.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 92ddec2cede10294fbff8b33eea6478c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs new file mode 100644 index 00000000000..5324af34de0 --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs @@ -0,0 +1,34 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using Framework; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.UIElements; +using Button = UnityEngine.UI.Button; +using Image = UnityEngine.UI.Image; + +public class UI_LoadingBinder +{ + + public static void GetComponents(UI_LoadingController window) + { + window.Image_BG = window.GetComponent("Image_BG"); + window.Text_InfoTitle = window.GetComponent("Image_BG/Text_InfoTitle"); + window.Text_Info = window.GetComponent("Image_BG/Text_InfoTitle/Text_Info"); + window.Text_Process = window.GetComponent("Image_BG/Text_Process"); + window.Text_Capacity = window.GetComponent("Image_BG/Text_Process/Text_Capacity"); + window.Image_ProcessBar = window.GetComponent("Image_BG/Image_ProcessBar"); + + } + + /****** 定义变量语句 ****** + public Image Image_BG; + public TMP_Text Text_InfoTitle; + public TMP_Text Text_Info; + public TMP_Text Text_Process; + public TMP_Text Text_Capacity; + public Image Image_ProcessBar; + + ****** End ******/ +} \ No newline at end of file diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs.meta b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs.meta new file mode 100644 index 00000000000..970a8546e77 --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LoadingBinder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b811f9473872c7c4388a383d9dbc4a2b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LogInBinder.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LogInBinder.cs new file mode 100644 index 00000000000..2d8d85ac933 --- /dev/null +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/UIBinder/UI_LogInBinder.cs @@ -0,0 +1,77 @@ +using System.Collections; +using System.Collections.Generic; +using TMPro; +using Framework; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.UIElements; +using Button = UnityEngine.UI.Button; +using Image = UnityEngine.UI.Image; + +public class UI_LogInBinder +{ + + public static void GetComponents(UI_LogInController window) + { + window.Image_BG = window.GetComponent("Image_BG"); + window.Button_Play = window.GetComponent