新登录界面

main
LuoFang 2023-11-24 12:48:57 +08:00
parent 236c5e7bf0
commit 5af0b82874
26 changed files with 1056 additions and 7 deletions

BIN
ProjectNLD/Assets/Art/UI/Texture/SDKLogin/TapTap-60.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -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:

View File

@ -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";
}

View File

@ -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);
}
}

View File

@ -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)
{

View File

@ -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<LoadingUILocalize>
{
public StringConfig Config => cfg;
StringConfig cfg;
private async UniTask<JSONNode> 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<TextAsset>(filePath);
var loadAsset = await AssetManager.Instance.LoadAssetAsync<TextAsset>(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;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 92ddec2cede10294fbff8b33eea6478c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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>("Image_BG");
window.Text_InfoTitle = window.GetComponent<TMP_Text>("Image_BG/Text_InfoTitle");
window.Text_Info = window.GetComponent<TMP_Text>("Image_BG/Text_InfoTitle/Text_Info");
window.Text_Process = window.GetComponent<TMP_Text>("Image_BG/Text_Process");
window.Text_Capacity = window.GetComponent<TMP_Text>("Image_BG/Text_Process/Text_Capacity");
window.Image_ProcessBar = window.GetComponent<Image>("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 ******/
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b811f9473872c7c4388a383d9dbc4a2b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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>("Image_BG");
window.Button_Play = window.GetComponent<Button>("Image_BG/Button_Play");
window.Text_Play = window.GetComponent<TMP_Text>("Image_BG/Button_Play/Text_Play");
window.Button_PlayerCentre = window.GetComponent<Button>("Image_BG/Button_PlayerCentre");
window.Text_PlayerCentre = window.GetComponent<TMP_Text>("Image_BG/Button_PlayerCentre/Text_PlayerCentre");
window.Button_Notice = window.GetComponent<Button>("Image_BG/Button_Notice");
window.Text_Notice = window.GetComponent<TMP_Text>("Image_BG/Button_Notice/Text_Notice");
window.Image_logBG = window.GetComponent<Image>("Image_BG/Image_logBG");
window.Button_Close = window.GetComponent<Button>("Image_BG/Image_logBG/Button_Close");
window.Text_AccountLog = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_AL/Button_AccountLog/Text_AccountLog");
window.InputField_AL = window.GetComponent<TMP_InputField>("Image_BG/Image_logBG/UI_AL/Button_AccountLog/InputField_AL");
window.InputField_Pass = window.GetComponent<TMP_InputField>("Image_BG/Image_logBG/UI_AL/Button_AccountLog/InputField_Pass");
window.Text_Info = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_AL/Button_AccountLog/Toggle_AL/Background/Text_Info");
window.Button_AL = window.GetComponent<Button>("Image_BG/Image_logBG/UI_AL/Button_AL");
window.Text_AL = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_AL/Button_AL/Text_AL");
window.Text_PhoneLog = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/Text_PhoneLog");
window.InputField_PL = window.GetComponent<TMP_InputField>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/InputField_PL");
window.InputField_Code = window.GetComponent<TMP_InputField>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/InputField_Code");
window.Button_GetCode = window.GetComponent<Button>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/InputField_Code/Button_GetCode");
window.Text_GetCode = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/InputField_Code/Button_GetCode/Text_GetCode");
window.Text_Info = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_PL/Button_PhoneLog/Toggle_PL/Background/Text_Info");
window.Button_PL = window.GetComponent<Button>("Image_BG/Image_logBG/UI_PL/Button_PL");
window.Text_PL = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/UI_PL/Button_PL/Text_PL");
window.Button_Log = window.GetComponent<Button>("Image_BG/Image_logBG/Button_Log");
window.Text_Log = window.GetComponent<TMP_Text>("Image_BG/Image_logBG/Button_Log/Text_Log");
}
/****** ******
public Image Image_BG;
public Button Button_Play;
public TMP_Text Text_Play;
public Button Button_PlayerCentre;
public TMP_Text Text_PlayerCentre;
public Button Button_Notice;
public TMP_Text Text_Notice;
public TMP_Text Text_ManagerInfo;
public Image Image_logBG;
public Button Button_Close;
public Button Button_AccountLog;
public TMP_Text Text_AccountLog;
public TMP_InputField InputField_AL;
public TMP_InputField InputField_Pass;
public Toggle Toggle_AL;
public TMP_Text Text_Info;
public Button Button_AL;
public TMP_Text Text_AL;
public Button Button_PhoneLog;
public TMP_Text Text_PhoneLog;
public TMP_InputField InputField_PL;
public TMP_InputField InputField_Code;
public Button Button_GetCode;
public TMP_Text Text_GetCode;
public Toggle Toggle_PL;
public TMP_Text Text_Info;
public Button Button_PL;
public TMP_Text Text_PL;
public Button Button_Log;
public TMP_Text Text_Log;
****** End ******/
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 566a1b2be3f443949af242a5809cd884
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,50 @@
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_LoginTipsBinder
{
public static void GetComponents(UI_LoginTipsController window)
{
window.Image_logBG = window.GetComponent<Image>("Image_logBG");
window.Button_Close = window.GetComponent<Button>("Image_logBG/Button_Close");
window.Button_PhoneLog = window.GetComponent<Button>("Image_logBG/UI_PL/Button_PhoneLog");
window.Text_PhoneLog = window.GetComponent<TMP_Text>("Image_logBG/UI_PL/Button_PhoneLog/Text_PhoneLog");
window.InputField_PL = window.GetComponent<TMP_InputField>("Image_logBG/UI_PL/Button_PhoneLog/InputField_PL");
window.InputField_Code = window.GetComponent<TMP_InputField>("Image_logBG/UI_PL/Button_PhoneLog/InputField_Code");
window.Button_GetCode = window.GetComponent<Button>("Image_logBG/UI_PL/Button_PhoneLog/InputField_Code/Button_GetCode");
window.Text_GetCode = window.GetComponent<TMP_Text>("Image_logBG/UI_PL/Button_PhoneLog/InputField_Code/Button_GetCode/Text_GetCode");
window.Text_Info = window.GetComponent<TMP_Text>("Image_logBG/UI_PL/Button_PhoneLog/Toggle_PL/Background/Text_Info");
window.Text_PL = window.GetComponent<TMP_Text>("Image_logBG/UI_PL/Text_PL");
window.Button_Log = window.GetComponent<Button>("Image_logBG/Button_Log");
window.Text_Log = window.GetComponent<TMP_Text>("Image_logBG/Button_Log/Text_Log");
window.Text_NoLog = window.GetComponent<TMP_Text>("Image_logBG/Text_NoLog");
}
/****** ******
public Image Image_logBG;
public Button Button_Close;
public Button Button_PhoneLog;
public TMP_Text Text_PhoneLog;
public TMP_InputField InputField_PL;
public TMP_InputField InputField_Code;
public Button Button_GetCode;
public TMP_Text Text_GetCode;
public Toggle Toggle_PL;
public TMP_Text Text_Info;
public TMP_Text Text_PL;
public Button Button_Log;
public TMP_Text Text_Log;
public TMP_Text Text_NoLog;
public TMP_Text Text_Info (1);
****** End ******/
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a2227d46d8d6174408e53b20fbb8f7a3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,145 @@
using TMPro;
using Image = UnityEngine.UI.Image;
using System;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;
using Gameplay.SubSystems;
using UnityEngine;
using Framework;
using Gameplay;
public class UI_LoadingController : UIWindow
{
//UI GameObj
///Auto Gen Start///
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;
///Auto Gen End///
// Use this for initialization
//------------------------- 进度控制
private float lastUpdate = 0f;
private float displayProgress = 0f;
private bool loadResEnd;
private Action onLoadingEnd;
int index = 0;
public override async void OnAwake()
{
//bind UI GameObj
UI_LoadingBinder.GetComponents(this);
await LoadingUILocalize.Instance.Init();
}
//invoke when open window
protected override void OnOpenWindow(object data = null)
{
}
//invoke when reload window
protected override void OnReloadWindow(object data = null)
{
}
private int GetIndexPlusOne(int i)
{
i++;
if(i< LoadingUILocalize.Instance.Config.DataList.Count)
{
return i;
}
return 0;
}
float refreshTime = 3f;
float nowTime = 0;
void Update()
{
if (nowTime >= refreshTime)
{
nowTime = 0;
RefreshJieShao();
index= GetIndexPlusOne(index);
}
else
{
nowTime += Time.deltaTime;
}
var currentExcutor = LoadingExecutorManager.Instance.CurrentExcutor;
if (currentExcutor != null)
{
LoadingText();
if (displayProgress < currentExcutor.DestProgress)
{
float diffValue = currentExcutor.DestProgress - displayProgress;
float deltaValue = 0.02f;
if (loadResEnd) //资源文件下载完后进度条最小走1
deltaValue = Mathf.Max(1.0f, diffValue * 0.1f);
else if (diffValue < 0.5f) //资源下载过程中进度条精确到小数点后2位
deltaValue = Mathf.Max(0.02f, diffValue * 0.1f);
else
deltaValue = Mathf.Max(0.1f, diffValue * 0.1f);
displayProgress += deltaValue;
displayProgress = Mathf.Min(100f, displayProgress);
SetLoadingPrecentage(displayProgress);
}
}
}
private void RefreshJieShao()
{
string[] alltext = LoadingUILocalize.Instance.GetTextByIndex(index).Split("/");
Text_InfoTitle.text =alltext[0] ;
Text_Info.text = alltext[1];
}
private void LoadingText()
{
const float EPSINON = 0.000001f;
if (Math.Abs(lastUpdate) < EPSINON)
{
SetLoadingPrecentage(0f);
}
if (Math.Abs(lastUpdate) < EPSINON || Time.unscaledTime > (lastUpdate + 5f))
{
lastUpdate = Time.unscaledTime;
}
}
private async Task SetLoadingPrecentage(float num)
{
float x = num ;
Text_Process.text = x.ToString("f0")+"%";
Image_ProcessBar.fillAmount = x;
if (num >= 100f)
{
await UniTask.NextFrame();
onLoadingEnd?.Invoke();
HideWindow();
}
}
public void StartLoading(Action onEnd)
{
enabled = true;
displayProgress = 0;
Image_ProcessBar.fillAmount = 0f;
Text_Process.text = 0+"%";
onLoadingEnd = onEnd;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66773a40863a69f43be65f051f74d92b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,224 @@
using Gameplay.Net;
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Button = UnityEngine.UI.Button;
using Image = UnityEngine.UI.Image;
using Framework;
using System.Collections;
public class UI_LogInController : UIWindow
{
//UI GameObj
///Auto Gen Start///
public Image Image_BG;
public Button Button_Play;
public TMP_Text Text_Play;
public Button Button_PlayerCentre;
public TMP_Text Text_PlayerCentre;
public Button Button_Notice;
public TMP_Text Text_Notice;
public TMP_Text Text_ManagerInfo;
public Image Image_logBG;
public Button Button_Close;
public Button Button_AccountLog;
public TMP_Text Text_AccountLog;
public TMP_InputField InputField_AL;
public TMP_InputField InputField_Pass;
public TMP_Text Text_Info;
public Button Button_AL;
public TMP_Text Text_AL;
public Button Button_PhoneLog;
public TMP_Text Text_PhoneLog;
public TMP_InputField InputField_PL;
public TMP_InputField InputField_Code;
public Button Button_GetCode;
public TMP_Text Text_GetCode;
public Button Button_PL;
public TMP_Text Text_PL;
public Button Button_Log;
public TMP_Text Text_Log;
private TMPro.TMP_InputField _Input;
private TMP_Dropdown dropdown;
bool isAgree;
private Toggle agreenToggle;
Button TapTapBtn;
public Material mBgMaterial;
public float speed = 1f;
GameObject TipsObj;
private TMP_Text IdText;
private TMP_Text versionText;
///Auto Gen End///
// Use this for initialization
public override void OnAwake()
{
//bind UI GameObj
UI_LogInBinder.GetComponents(this);
TapTapBtn = GetComponent<Button>("Image_BG/TapTapBtn");
agreenToggle = GetComponent<Toggle>("Image_BG/Image_logBG/UI_AL/Button_AccountLog/Toggle_AL");
dropdown = GameObject.Find("Image_BG/Image_logBG/UI_AL/Button_AccountLog/ALDropdown").GetComponent<TMP_Dropdown>();
dropdown.onValueChanged.AddListener(onValueChanged);
IdText = GetComponent<TMP_Text>("Image_BG/ID");
versionText = GetComponent<TMP_Text>("Image_BG/vesion");
string account = PlayerPrefs.GetString("LoginAccount", "");
InputField_Pass.text = account;
BindButton(Button_Log, OnButtonLogin);
BindButton(TapTapBtn, OnTapTapBtnOnClick);
UpadteDropdownSeverName();
BindButton("Image_BG/Button_Play", OnButtonLogin);
BindButton(Button_PL, OnButtonPhoneLogin);
BindButton("Image_BG/Image_logBG/UI_AL/Button_AccountLog/Toggle_AL/AgreeBtn", OnAgreenBtnClick);
BindButton(Button_Notice, OnNoticeClick);
RefreshAgreenToggle();
mBgMaterial = Image_BG.material;
TipsObj = FindObj("Tip");
}
private async void OnNoticeClick()
{
await UIManager.Instance.OpenWindow(UINameConst.UI_Notice);
}
private void OnTapTapBtnOnClick()
{
Actor.Instance.Login.StartLogin(NLDPB.LoginType.TapTap);
}
private void RegisterEvent()
{
EventManager.Instance.Register(EventManager.EventName.EN_UINewLoginTips, (Action<string>)OnRecvNewLoginTips);
}
private void OnRecvNewLoginTips(string obj)
{
TipsObj.SetActive(true);
Utils.CommonUtils.GetComponent<TMP_Text>(TipsObj, "label").text = obj;
IEnumerator coroutine = waitTime();
StartCoroutine(coroutine);
}
private IEnumerator waitTime()
{
yield return new WaitForSeconds(2f);
TipsObj.SetActive(false);
}
private void RefreshTapTapBtn()
{
#if SDK_TAPTAP
FindObj("taptap").SetActive(true);
#else
FindObj("taptap").SetActive(false);
#endif
}
private void Update()
{
// mBgMaterial.mainTextureOffset += new Vector2( Time.deltaTime * speed,0);
}
private void OnAgreenBtnClick()
{
isAgree = !isAgree;
RefreshAgreenToggle();
}
private void RefreshAgreenToggle()
{
agreenToggle.isOn = isAgree;
}
private async void OnButtonPhoneLogin()
{
OnRecvNewLoginTips("功能暂未开放,敬请期待");
}
public void onValueChanged(int value)
{
AppConfig.Instance.Select(value);
PlayerPrefs.SetInt("ServerIndex", value);
return;
}
private void UpadteDropdownSeverName()
{
dropdown.options.Clear();
var serverInfo = AppConfig.Instance.GetServerInfo();
if (serverInfo.Count <= 0)
{
return;
}
foreach (var item in serverInfo)
{
dropdown.options.Add(new TMP_Dropdown.OptionData() { text = item.name });
}
var index = PlayerPrefs.GetInt("ServerIndex", 0);
if (index >= 0 && index <= serverInfo.Count)
{
dropdown.captionText.text = serverInfo[index].name;
dropdown.value = index;
}
else
{
dropdown.captionText.text = serverInfo[0].name;
dropdown.value = 0;
}
AppConfig.Instance.Select(index);
}
private async void OnButtonLogin()
{
if(!isAgree)
{
await UIManager.Instance.OpenWindow(UINameConst.UI_LoginTips, InputField_Pass.text);
return;
}
PlayerPrefs.SetString("LoginAccount", InputField_Pass.text);
Gameplay.Net.Actor.Instance.StartLogin(NLDPB.LoginType.Phxh, InputField_Pass.text);
CloseWindow();
}
//invoke when open window
protected override void OnOpenWindow(object data = null)
{
RegisterEvent();
agreenToggle.isOn = true;
isAgree = false;
IdText.text = "uid: " + PlayerPrefs.GetString("LoginAccount", "");
RefreshTapTapBtn();
}
//invoke when reload window
protected override void OnReloadWindow(object data = null)
{
}
protected override void OnCloseWindow()
{
UnRegisterEvent();
}
private void UnRegisterEvent()
{
EventManager.Instance.Unregister(EventManager.EventName.EN_UINewLoginTips, (Action<string>)OnRecvNewLoginTips);
}
//invoke when close window
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f6f413af5fc7ab640a7793e727f1c010
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
using Button = UnityEngine.UI.Button;
using Image = UnityEngine.UI.Image;
using Framework;
using System;
using UnityEngine.Windows;
public class UI_LoginTipsController : UIWindow
{
//UI GameObj
///Auto Gen Start///
public Image Image_logBG;
public Button Button_Close;
public Button Button_PhoneLog;
public TMP_Text Text_PhoneLog;
public TMP_InputField InputField_PL;
public TMP_InputField InputField_Code;
public Button Button_GetCode;
public TMP_Text Text_GetCode;
public TMP_Text Text_Info;
public TMP_Text Text_PL;
public Button Button_Log;
public TMP_Text Text_Log;
public TMP_Text Text_NoLog;
string accountstr;
///Auto Gen End///
// Use this for initialization
public override void OnAwake()
{
//bind UI GameObj
UI_LoginTipsBinder.GetComponents(this);
BindButton(Button_Close, OnCloseClick);
BindButton("Image_logBG/NoAgreeBtn", OnCloseClick);
BindButton("Image_logBG/Button_Log", OnLogClick);
}
private void OnLogClick()
{
PlayerPrefs.SetString("LoginAccount", accountstr);
Gameplay.Net.Actor.Instance.StartLogin(NLDPB.LoginType.Phxh, accountstr);
CloseWindow();
UIManager.Instance.CloseWindow(UINameConst.UI_LogIn);
}
private void OnCloseClick()
{
CloseWindow();
}
//invoke when open window
protected override void OnOpenWindow(object data)
{
accountstr = data as string;
}
//invoke when reload window
protected override void OnReloadWindow(object data = null)
{
}
//invoke when close window
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c029723dd60db945b5a5d066298c737
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1181,6 +1181,12 @@ namespace Utils
}
return "";
}
public static void ShowTips(string TipsMsg)
{
UIManager.Instance.ShowUITips(UINameConst.UIAirView, TipsMsg);
}
}
}

View File

@ -3535,5 +3535,53 @@
1000554
],
"IconPath": "Assets/Art/UI/Texture/UI_Pic_Main/UI_Pic_CultivateAll/UI_Pic_Cultivate/UI_Cultivate_SkillLogo.png"
},
{
"ID": 30001,
"NameRead": "工兵基础54",
"Name": "skill_5",
"SkillType": 0,
"SkillDesc": "skill_desc5",
"SkillActionId": 1,
"TargetType": 5,
"ReleaseCheckType": 2,
"ReleaseArea": 5,
"SelectCount": -1,
"InfluenceAreaId": 1,
"ShowAreaId": 1,
"ShowEffectId": -1,
"PassiveBuffIds": [],
"IntParams": [],
"FloatParams": [],
"CDTime": 20,
"LogicId": 10005,
"ReferIds": [
1000554
],
"IconPath": "Assets/Art/UI/Texture/UI_Pic_Main/UI_Pic_CultivateAll/UI_Pic_Cultivate/UI_Cultivate_SkillLogo.png"
},
{
"ID": 30002,
"NameRead": "工兵基础54",
"Name": "skill_5",
"SkillType": 0,
"SkillDesc": "skill_desc5",
"SkillActionId": 1,
"TargetType": 5,
"ReleaseCheckType": 2,
"ReleaseArea": 5,
"SelectCount": -1,
"InfluenceAreaId": 1,
"ShowAreaId": 1,
"ShowEffectId": -1,
"PassiveBuffIds": [],
"IntParams": [],
"FloatParams": [],
"CDTime": 20,
"LogicId": 10005,
"ReferIds": [
1000554
],
"IconPath": "Assets/Art/UI/Texture/UI_Pic_Main/UI_Pic_CultivateAll/UI_Pic_Cultivate/UI_Cultivate_SkillLogo.png"
}
]

View File

@ -1311,6 +1311,22 @@
302
]
},
{
"MotionName": "观察-浏览四周",
"MotionFullPath": "Assets/Art/Animations/Show/ani_s_observe03_a001.fbx",
"RangeStart": [
0,
423
],
"RangeLoop": [
424,
544
],
"RangeEnd": [
545,
565
]
},
{
"MotionName": "冷",
"MotionFullPath": "Assets/Art/Animations/Show/ani_s_cold01_a001.fbx",

View File

@ -0,0 +1,8 @@
[
{
"ID": 10001,
"Key": "1",
"Value": "一些介绍性文字/一些介绍性文字, 大概分个\n几行 弄点世界观介绍,\n 控制在两行左右效果最好。",
"Value_En": "common_ok"
}
]

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ad1ea64474d706c429a0ee9e7b9cce03
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1264,5 +1264,29 @@
"Key": "uiInterface_team",
"Value": "编队",
"Value_En": ""
},
{
"ID": 70009,
"Key": "uilogin_agreeTips",
"Value": "我已详细阅读并同意《许可服务协议》、《隐私 政策》和《儿童信息及隐私保护政策》",
"Value_En": ""
},
{
"ID": 70010,
"Key": "uilogin_agreeTitle",
"Value": "用户协议及隐私保护",
"Value_En": ""
},
{
"ID": 70011,
"Key": "uilogin_agree",
"Value": "同意",
"Value_En": ""
},
{
"ID": 70012,
"Key": "uilogin_noAgree",
"Value": "不同意",
"Value_En": ""
}
]

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca58617efad162b4abac0256104fac54
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: