diff --git a/Assets/Scripts/UI/UIInput_AnHuiBaoShi.cs b/Assets/Scripts/UI/UIInput_AnHuiBaoShi.cs index 4086df1c..6bc89b66 100644 --- a/Assets/Scripts/UI/UIInput_AnHuiBaoShi.cs +++ b/Assets/Scripts/UI/UIInput_AnHuiBaoShi.cs @@ -13,22 +13,22 @@ namespace QFramework.Example public partial class UIInput_AnHuiBaoShi : UIPanel { - public int CurrentInputIndex;//当前索引次数 - [Header("所有的图片")] + public int CurrentInputIndex;//褰撳墠绱㈠紩娆℃暟 + [Header("鎵鏈夌殑鍥剧墖")] public Image[] images; - [Header("设置最大目标值")] - public string[] targetMax; // 设置最大目标值 - [Header("设置最小目标值")] - public string[] targetMin; // 设置最小目标值 + [Header("璁剧疆鏈澶х洰鏍囧")] + public string[] targetMax; // 璁剧疆鏈澶х洰鏍囧 + [Header("璁剧疆鏈灏忕洰鏍囧")] + public string[] targetMin; // 璁剧疆鏈灏忕洰鏍囧 - [Header("最大目标值错误次数")] - public int errowIntMax = 0;//最大目标值错误次数 - [Header("最小目标值错误次数")] - public int errowIntMin = 0;//最小目标值错误次数 - [Header("错误弹窗")] - public GameObject errowTip;//错误弹窗 - public Button errowTipClickBtn;//错误弹窗,确认按钮 + [Header("鏈澶х洰鏍囧奸敊璇鏁")] + public int errowIntMax = 0;//鏈澶х洰鏍囧奸敊璇鏁 + [Header("鏈灏忕洰鏍囧奸敊璇鏁")] + public int errowIntMin = 0;//鏈灏忕洰鏍囧奸敊璇鏁 + [Header("閿欒寮圭獥")] + public GameObject errowTip;//閿欒寮圭獥 + public Button errowTipClickBtn;//閿欒寮圭獥锛岀‘璁ゆ寜閽 private string tMP_InputField1Value = "1.770"; @@ -43,7 +43,7 @@ namespace QFramework.Example - public GameObject ZheSheInput;//输入三个数值的输入框 + public GameObject ZheSheInput;//杈撳叆涓変釜鏁板肩殑杈撳叆妗 @@ -70,8 +70,13 @@ namespace QFramework.Example mData = uiData as UIInput_AnHuiBaoShiData ?? new UIInput_AnHuiBaoShiData(); OnReSet(); OnOpen(); + TypeEventSystem.Global.Register(OnModuleQuit).UnRegisterWhenGameObjectDestroyed(gameObject); } + public void OnModuleQuit(OnModuleQuit arg) + { + Hide(); + } protected override void OnOpen(IUIData uiData = null) { @@ -108,7 +113,7 @@ namespace QFramework.Example tMP_InputField3.text == tMP_InputField3Value) { - StringEventSystem.Global.Send("InputUI使用结束"); + StringEventSystem.Global.Send("InputUI浣跨敤缁撴潫"); } } @@ -198,7 +203,7 @@ namespace QFramework.Example } /// - /// 输入最大值 + /// 杈撳叆鏈澶у /// /// private void CheckInputMax(string userInput) @@ -206,7 +211,7 @@ namespace QFramework.Example var v = targetMax[CurrentInputIndex].ToString(); if (v != userInput) { - //第3次,填入正确答案 + //绗3娆★紝濉叆姝g‘绛旀 if (errowIntMax >= 3) { @@ -227,10 +232,10 @@ namespace QFramework.Example } - //正确++ + //姝g‘++ else { - Debug.Log("填写数值正确"); + Debug.Log("濉啓鏁板兼纭"); userInput = targetMax.ToString(); SetNextInput(); @@ -238,7 +243,7 @@ namespace QFramework.Example } /// - /// 输入最小值 + /// 杈撳叆鏈灏忓 /// /// private void CheckInputMin(string userInput) @@ -247,7 +252,7 @@ namespace QFramework.Example var v = targetMin[CurrentInputIndex].ToString(); if (v != userInput) { - //第四次,填入正确答案 + //绗洓娆★紝濉叆姝g‘绛旀 if (errowIntMin >= 3) { @@ -269,10 +274,10 @@ namespace QFramework.Example } - //正确++ + //姝g‘++ else { - Debug.Log("填写数值正确"); + Debug.Log("濉啓鏁板兼纭"); userInput = targetMax.ToString(); SetNextInput(); @@ -284,9 +289,10 @@ namespace QFramework.Example protected override void OnHide() { - StringEventSystem.Global.Send("InputUI使用结束"); + StringEventSystem.Global.Send("InputUI浣跨敤缁撴潫"); } + protected override void OnClose() { } @@ -297,7 +303,7 @@ namespace QFramework.Example { //InputFieldmax.ActivateInputField(); //InputFieldmin.ActivateInputField(); - //重置 + //閲嶇疆 errowTip.gameObject.SetActive(false); errowIntMax = 0; errowIntMin = 0; @@ -316,7 +322,7 @@ namespace QFramework.Example if (CurrentInputIndex < images.Length) { - // 先递增索引 + // 鍏堥掑绱㈠紩 foreach (var item in images) { diff --git a/Assets/Scripts/UI/UIModuleSelect.cs b/Assets/Scripts/UI/UIModuleSelect.cs index a4f6f688..e9663c5d 100644 --- a/Assets/Scripts/UI/UIModuleSelect.cs +++ b/Assets/Scripts/UI/UIModuleSelect.cs @@ -98,10 +98,6 @@ namespace QFramework.Example TypeEventSystem.Global.Send(new OnLoadingHide()); }); } - - - - } @@ -131,7 +127,6 @@ namespace QFramework.Example } UIKit.OpenPanelAsync(canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => { - TypeEventSystem.Global.Send(); TypeEventSystem.Global.Send(); Hide();