From b96e775d22f25ca579b7775273014a00234ec9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=93=AE?= <834207172@qq.com> Date: Mon, 21 Apr 2025 18:14:17 +0800 Subject: [PATCH] =?UTF-8?q?UI=E5=A2=9E=E5=8A=A0event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../06.UIFarme/RunTime/Manager/PanelSystem.cs | 64 ++++++++++++++++++- Assets/06.UIFarme/package.json | 2 +- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/Assets/06.UIFarme/RunTime/Manager/PanelSystem.cs b/Assets/06.UIFarme/RunTime/Manager/PanelSystem.cs index 227a7d6..a636517 100644 --- a/Assets/06.UIFarme/RunTime/Manager/PanelSystem.cs +++ b/Assets/06.UIFarme/RunTime/Manager/PanelSystem.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; @@ -30,7 +31,31 @@ namespace Stary.Evo.UIFarme /// 面板全部出栈此操作会执行面板的OnExit方法 /// void PopAll(); + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key) where TEvent : IConvertible; + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvalue1 value) where TEvent : IConvertible; + + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvalue1 value1, Tvalue2 value2) + where TEvent : IConvertible; + + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvlue1 value1, Tvlue2 vlue2, Tvlue3 vlue3) + where TEvent : IConvertible; /// /// 返回存储面板实例的字典 /// @@ -175,8 +200,45 @@ namespace Stary.Evo.UIFarme queuePanel.Clear(); } + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key) where TEvent : IConvertible + { + this.SendEvent(key); + } + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvalue1 value) where TEvent : IConvertible + { + this.SendEvent(key,value); + } + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvalue1 value1, Tvalue2 value2) + where TEvent : IConvertible + { + this.SendEvent(key, value1, value2); + } + + /// + /// 事件发送 + /// + /// + public void SendEvent(TEvent key, Tvlue1 value1, Tvlue2 vlue2, Tvlue3 vlue3) + where TEvent : IConvertible + { + this.SendEvent(key, value1, vlue2, vlue3); + } + + public Dictionary Get_Dic() { if (dicUI.Count > 0) diff --git a/Assets/06.UIFarme/package.json b/Assets/06.UIFarme/package.json index f210edf..f2da219 100644 --- a/Assets/06.UIFarme/package.json +++ b/Assets/06.UIFarme/package.json @@ -1,7 +1,7 @@ { "name": "com.staryevo.uifarme", "displayName": "06.UIFarme", - "version": "1.0.1", + "version": "1.0.2", "description": "UI模板框架工具", "unity": "2021.3", "unityRelease": "30f1",