diff --git a/Assets/Scripts/Actions/ActionHelper.cs b/Assets/Scripts/Actions/ActionHelper.cs index f5fe5cc9..63f61227 100644 --- a/Assets/Scripts/Actions/ActionHelper.cs +++ b/Assets/Scripts/Actions/ActionHelper.cs @@ -16,8 +16,10 @@ public class ActionHelper { "UIBtns", typeof(QFramework.Example.UIBtns) }, { "UITools", typeof(QFramework.Example.UITools) }, { "UIHint", typeof(QFramework.Example.UIHint) }, - { "UITextTip", typeof(QFramework.Example.UITextTip) }, + { "UIPointQuestion", typeof(QFramework.Example.UIPointQuestion) }, + { "UIBtns", typeof(QFramework.Example.UIPointQuestion) }, { "UICameraSwitch", typeof(QFramework.Example.UICameraSwitch) }, + }; diff --git a/Assets/Scripts/UI/UIBtns.cs b/Assets/Scripts/UI/UIBtns.cs index 25a74062..d55ca9a4 100644 --- a/Assets/Scripts/UI/UIBtns.cs +++ b/Assets/Scripts/UI/UIBtns.cs @@ -3,6 +3,8 @@ using UnityEngine.UI; using QFramework; using System.Collections.Generic; using TMPro; +using static OperationController; +using System; namespace QFramework.Example { @@ -16,6 +18,12 @@ namespace QFramework.Example { mData = uiData as UIBtnsData ?? new UIBtnsData(); // please add init code here + TypeEventSystem.Global.Register(OnStepChanged); + } + + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); } protected override void OnOpen(IUIData uiData = null) diff --git a/Assets/Scripts/UI/UIHint.cs b/Assets/Scripts/UI/UIHint.cs index 02b13e5b..b03364bd 100644 --- a/Assets/Scripts/UI/UIHint.cs +++ b/Assets/Scripts/UI/UIHint.cs @@ -3,6 +3,7 @@ using UnityEngine.UI; using QFramework; using DG.Tweening; using System.Runtime.CompilerServices; +using static OperationController; namespace QFramework.Example { @@ -20,8 +21,13 @@ namespace QFramework.Example { mData = uiData as UIHintData ?? new UIHintData(); SetItem(0); + TypeEventSystem.Global.Register(OnStepChanged); } + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); + } protected override void OnOpen(IUIData uiData = null) { mData = uiData as UIHintData ?? new UIHintData(); diff --git a/Assets/Scripts/UI/UIPointQuestion.cs b/Assets/Scripts/UI/UIPointQuestion.cs index 607d230d..49c43b95 100644 --- a/Assets/Scripts/UI/UIPointQuestion.cs +++ b/Assets/Scripts/UI/UIPointQuestion.cs @@ -2,6 +2,7 @@ using UnityEngine; using UnityEngine.UI; using QFramework; using System.Collections.Generic; +using static OperationController; namespace QFramework.Example { @@ -16,6 +17,12 @@ namespace QFramework.Example { mData = uiData as UIPointQuestionData ?? new UIPointQuestionData(); // please add init code here + TypeEventSystem.Global.Register(OnStepChanged); + } + + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); } protected override void OnOpen(IUIData uiData = null) diff --git a/Assets/Scripts/UI/UIResultTip.cs b/Assets/Scripts/UI/UIResultTip.cs index aad5a5de..8e613038 100644 --- a/Assets/Scripts/UI/UIResultTip.cs +++ b/Assets/Scripts/UI/UIResultTip.cs @@ -3,6 +3,7 @@ using UnityEngine.UI; using QFramework; using TMPro; using System; +using static OperationController; namespace QFramework.Example { @@ -19,8 +20,13 @@ namespace QFramework.Example mData = uiData as UIResultTipData ?? new UIResultTipData(); Right.gameObject.SetActive(false); Wrong.gameObject.SetActive(false); + TypeEventSystem.Global.Register(OnStepChanged); } + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); + } protected override void OnOpen(IUIData uiData = null) { Right.gameObject.SetActive(false); diff --git a/Assets/Scripts/UI/UITextQuestion.cs b/Assets/Scripts/UI/UITextQuestion.cs index 3f8fc014..d1b44fab 100644 --- a/Assets/Scripts/UI/UITextQuestion.cs +++ b/Assets/Scripts/UI/UITextQuestion.cs @@ -6,6 +6,7 @@ using TMPro; using System; using Microsoft.SqlServer.Server; using XMLTool; +using static OperationController; namespace QFramework.Example { @@ -32,8 +33,13 @@ namespace QFramework.Example { mData = uiData as UITextQuestionData ?? new UITextQuestionData(); // please add init code here + TypeEventSystem.Global.Register(OnStepChanged); } + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); + } protected override void OnOpen(IUIData uiData = null) { mData = uiData as UITextQuestionData ?? new UITextQuestionData(); diff --git a/Assets/Scripts/UI/UITipWindow.cs b/Assets/Scripts/UI/UITipWindow.cs index cb4efa03..e4208481 100644 --- a/Assets/Scripts/UI/UITipWindow.cs +++ b/Assets/Scripts/UI/UITipWindow.cs @@ -4,6 +4,7 @@ using QFramework; using System; using System.Collections.Generic; using TMPro; +using static OperationController; namespace QFramework.Example { @@ -24,6 +25,12 @@ namespace QFramework.Example mData = uiData as UITipWindowData ?? new UITipWindowData(); // please add init code here + TypeEventSystem.Global.Register(OnStepChanged); + } + + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); } protected override void OnOpen(IUIData uiData = null) diff --git a/Assets/Scripts/UI/UITools.cs b/Assets/Scripts/UI/UITools.cs index 9fbeb43e..30eb994b 100644 --- a/Assets/Scripts/UI/UITools.cs +++ b/Assets/Scripts/UI/UITools.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using TMPro; using System.Linq; using DG.Tweening; +using static OperationController; namespace QFramework.Example { @@ -29,6 +30,12 @@ namespace QFramework.Example { mData = uiData as UIToolsData ?? new UIToolsData(); // please add init code here + TypeEventSystem.Global.Register(OnStepChanged); + } + + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); } protected override void OnOpen(IUIData uiData = null)