This commit is contained in:
CortexCore
2023-10-24 23:38:22 +08:00
parent 2c4710bc5d
commit bd40165ade
152 changed files with 3681 additions and 1531 deletions

View File

@@ -30,6 +30,7 @@ namespace BITKit
public const string Input = "Input";
public const string Output = "Output";
public const string Graphic = "Graphic";
public const string HotFix = "HotFix";
}
public partial struct Animation
{

View File

@@ -61,14 +61,29 @@ namespace BITKit
}
public void InvokeDirect(string key,object value)
{
var list = events.Get(key);
list.ToArray().ForEach(x =>
foreach (var x in events.Get(key))
{
if (x is Action<object> action)
{
//Console.WriteLine(action.Method);
action.Invoke(value);
}
});
else
{
throw new ArgumentException($"事件{key}的监听器{x}不是Action<object>类型");
}
}
// list.ToArray().ForEach(x =>
// {
// if (x is Action<object> action)
// {
// action.Invoke(value);
// }
// else
// {
// Console.WriteLine(x);
// }
// });
}
public void Invoke(string typeName, object value)
{