mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-04-22 12:09:34 +08:00

* Add PluginLoader * 删除event返回值 * 添加插件触发器(方法组) * 删除冗余方法 * 将typeof(GetType())改写为this is * 删除无用引用
30 lines
788 B
C#
30 lines
788 B
C#
namespace Milimoe.FunGame.Core.Library.Common.Event
|
|
{
|
|
public class GeneralEventArgs : EventArgs
|
|
{
|
|
public string EventMsg { get; set; } = "";
|
|
public object[] Parameters { get; set; } = Array.Empty<object>();
|
|
public bool Cancel { get; set; } = false;
|
|
|
|
public GeneralEventArgs(string EventMsg, object[] Parameters)
|
|
{
|
|
this.EventMsg = EventMsg;
|
|
this.Parameters = Parameters;
|
|
}
|
|
|
|
public GeneralEventArgs(params object[] Parameters)
|
|
{
|
|
this.Parameters = Parameters;
|
|
}
|
|
}
|
|
|
|
public class GeneralEvent<T>
|
|
{
|
|
public T? Instance { get; set; }
|
|
public GeneralEvent()
|
|
{
|
|
Instance = (T?)Activator.CreateInstance(typeof(T?));
|
|
}
|
|
}
|
|
}
|