调整目录结构
This commit is contained in:
33
Assets/Scripts/Model/Utils/Extends/UIInputExtensions.cs
Normal file
33
Assets/Scripts/Model/Utils/Extends/UIInputExtensions.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using UIPanel = NBC.UIPanel;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class UIInputListenAttribute : BaseAttribute
|
||||
{
|
||||
}
|
||||
|
||||
public static class UIInputExtensions
|
||||
{
|
||||
public static void AutoListenInput(this GComponent panel)
|
||||
{
|
||||
var ms = Reflection.GetMethodsWithUIInputAttribute(panel.GetType(), typeof(UIInputListenAttribute));
|
||||
foreach (var method in ms)
|
||||
{
|
||||
Log.Error(method.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public static void AutoListenInput(this UIPanel panel)
|
||||
{
|
||||
var ms = Reflection.GetMethodsWithUIInputAttribute(panel.GetType(), typeof(UIInputListenAttribute));
|
||||
foreach (var method in ms)
|
||||
{
|
||||
Log.Error(method.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user