From e1de33b8963cc71ed2a3ed425a8dfe23849bd3c8 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Wed, 15 Jan 2025 17:40:26 +0800 Subject: [PATCH] =?UTF-8?q?hint=E5=A2=9E=E5=8A=A0=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Actions/HintAction.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Actions/HintAction.cs b/Assets/Scripts/Actions/HintAction.cs index 8471640d..d01bf719 100644 --- a/Assets/Scripts/Actions/HintAction.cs +++ b/Assets/Scripts/Actions/HintAction.cs @@ -45,7 +45,17 @@ namespace QFramework data.time = time; data.isShowIcon = showIcon; data.audio = audio; - UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => this.Finish()); + UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(() => + { + if (data.time != -1) + { + ActionKit.Delay(data.time, () => this.Finish()).StartGlobal(); + } + else + { + this.Finish(); + } + }); } public void OnExecute(float dt)